diff --git a/SabreTools.Serialization/Wrappers/PortableExecutable.cs b/SabreTools.Serialization/Wrappers/PortableExecutable.cs index 8925a87e..cbded142 100644 --- a/SabreTools.Serialization/Wrappers/PortableExecutable.cs +++ b/SabreTools.Serialization/Wrappers/PortableExecutable.cs @@ -1538,7 +1538,7 @@ namespace SabreTools.Serialization.Wrappers return false; // Read the section into a local array - int sectionLength = (int)Math.Max(section.SizeOfRawData, section.VirtualSize); + int sectionLength = (int)section.VirtualSize; byte[]? sectionData = source.ReadFrom(offset, sectionLength, retainPosition: true); // Parse the section header