This has been consistently wrong

This commit is contained in:
Matt Nadareski
2025-09-11 10:33:10 -04:00
parent 55e788a894
commit e9e89b0b43

View File

@@ -335,8 +335,10 @@ namespace SabreTools.Serialization.Deserializers
if (optionalHeader.CertificateTable != null)
{
offset = initialOffset
+ optionalHeader.CertificateTable.VirtualAddress.ConvertVirtualAddress(pex.SectionTable);
// The Certificate Table entry points to a table of attribute certificates. These
// certificates are not loaded into memory as part of the image. As such, the first
// field of this entry, which is normally an RVA, is a file pointer instead.
offset = initialOffset + optionalHeader.CertificateTable.VirtualAddress;
if (offset > initialOffset && offset < data.Length)
{
// Get the required table size