diff --git a/ArcFormats/Ethornell/AudioBGI.cs b/ArcFormats/Ethornell/AudioBGI.cs index 04198339..c03c3153 100644 --- a/ArcFormats/Ethornell/AudioBGI.cs +++ b/ArcFormats/Ethornell/AudioBGI.cs @@ -49,9 +49,10 @@ namespace GameRes.Formats.BGI if (!Binary.AsciiEqual (header, 4, "bw ")) return null; uint offset = LittleEndian.ToUInt32 (header, 0); - file.Seek (offset, SeekOrigin.Begin); + if (offset >= file.Length) + return null; - var input = new StreamRegion (file, file.Position); + var input = new StreamRegion (file, offset); return new OggInput (input); // input is left undisposed in case of exception. } diff --git a/ArcFormats/Properties/AssemblyInfo.cs b/ArcFormats/Properties/AssemblyInfo.cs index 7b160fd3..5f866893 100644 --- a/ArcFormats/Properties/AssemblyInfo.cs +++ b/ArcFormats/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion ("1.1.9.417")] -[assembly: AssemblyFileVersion ("1.1.9.417")] +[assembly: AssemblyVersion ("1.1.9.418")] +[assembly: AssemblyFileVersion ("1.1.9.418")]