From ca4d08567d2da09bc5be2e64a7e5d2faf2c742ff Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 15 Mar 2022 10:02:10 -0700 Subject: [PATCH] Fix resetting position for DebugSection --- .../ExecutableType/Microsoft/PE/Sections/DebugSection.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/ExecutableType/Microsoft/PE/Sections/DebugSection.cs b/BurnOutSharp/ExecutableType/Microsoft/PE/Sections/DebugSection.cs index dcc637e7..92e105c7 100644 --- a/BurnOutSharp/ExecutableType/Microsoft/PE/Sections/DebugSection.cs +++ b/BurnOutSharp/ExecutableType/Microsoft/PE/Sections/DebugSection.cs @@ -18,7 +18,7 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE.Sections /// public DebugDirectory DebugDirectory; - public static DebugSection Deserialize(Stream stream, SectionHeader[] sections) + public static DebugSection Deserialize(Stream stream) { long originalPosition = stream.Position; var ds = new DebugSection(); @@ -27,10 +27,11 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE.Sections // TODO: Read in raw debug data + stream.Seek(originalPosition, SeekOrigin.Begin); return ds; } - public static DebugSection Deserialize(byte[] content, ref int offset, SectionHeader[] sections) + public static DebugSection Deserialize(byte[] content, ref int offset) { int originalPosition = offset; var ds = new DebugSection(); @@ -39,6 +40,7 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE.Sections // TODO: Read in raw debug data + offset = originalPosition; return ds; } }