mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 14:54:56 +00:00
Fix malformed PE certificates
This commit is contained in:
@@ -707,7 +707,7 @@ namespace BurnOutSharp.Builder
|
||||
entry.Length = data.ReadUInt32(ref offset);
|
||||
entry.Revision = (WindowsCertificateRevision)data.ReadUInt16(ref offset);
|
||||
entry.CertificateType = (WindowsCertificateType)data.ReadUInt16(ref offset);
|
||||
if (entry.Length > 0)
|
||||
if (entry.Length - 8 > 0)
|
||||
entry.Certificate = data.ReadBytes(ref offset, (int)entry.Length - 8);
|
||||
|
||||
attributeCertificateTable.Add(entry);
|
||||
@@ -1856,7 +1856,7 @@ namespace BurnOutSharp.Builder
|
||||
entry.Length = data.ReadUInt32();
|
||||
entry.Revision = (WindowsCertificateRevision)data.ReadUInt16();
|
||||
entry.CertificateType = (WindowsCertificateType)data.ReadUInt16();
|
||||
if (entry.Length > 0)
|
||||
if (entry.Length - 8 > 0)
|
||||
entry.Certificate = data.ReadBytes((int)entry.Length - 8);
|
||||
|
||||
attributeCertificateTable.Add(entry);
|
||||
|
||||
Reference in New Issue
Block a user