mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-21 14:25:03 +00:00
Ensure that the data being read is actually large enough to have a debug directory entry parsed from it (#96)
This commit is contained in:
committed by
GitHub
parent
bcc0a5bd1e
commit
2a604bd73a
@@ -749,7 +749,7 @@ namespace SabreTools.Serialization.Readers
|
||||
var table = new List<Data.Models.PortableExecutable.DebugData.Entry>();
|
||||
|
||||
int offset = 0;
|
||||
while (offset < data.Length)
|
||||
while (offset < data.Length && data.Length - offset >= 28)
|
||||
{
|
||||
var entry = ParseDebugDirectoryEntry(data, ref offset);
|
||||
table.Add(entry);
|
||||
|
||||
Reference in New Issue
Block a user