Skip to content

Commit ad5314d

Browse files
committed
Minor tweak
1 parent eaa5bb5 commit ad5314d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SabreTools.Serialization/Readers/PortableExecutable.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ public class PortableExecutable : BaseBinaryReader<Executable>
330330
#region Hidden Resources
331331

332332
// If we have not used up the full size, parse the remaining chunk as a single resource
333-
if (pex.ResourceDirectoryTable?.Entries != null && tableOffset < tableSize)
333+
if (pex.ResourceDirectoryTable?.Entries != null
334+
&& tableOffset < tableSize
335+
&& (offset + tableOffset) != endOfSectionData)
334336
{
335337
// Resize the entry array to accomodate one more
336338
var localEntries = pex.ResourceDirectoryTable.Entries;

0 commit comments

Comments
 (0)