mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-23 22:55:05 +00:00
Fix unaligned end-of-file certificates
This commit is contained in:
@@ -715,7 +715,7 @@ namespace BurnOutSharp.Builder
|
||||
attributeCertificateTable.Add(entry);
|
||||
|
||||
// Align to the 8-byte boundary
|
||||
while ((offset % 8) != 0)
|
||||
while (offset < data.Length - 1 && (offset % 8) != 0)
|
||||
_ = data.ReadByte(ref offset);
|
||||
}
|
||||
|
||||
@@ -1866,7 +1866,7 @@ namespace BurnOutSharp.Builder
|
||||
attributeCertificateTable.Add(entry);
|
||||
|
||||
// Align to the 8-byte boundary
|
||||
while ((data.Position % 8) != 0)
|
||||
while (data.Position < data.Length - 1 && (data.Position % 8) != 0)
|
||||
_ = data.ReadByteValue();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user