Update ffsparser.cpp

Fix an issue with parsing CRC32 sections introduced in the previous commit
This commit is contained in:
Nikolaj Schlej 2023-01-03 01:17:41 -08:00 committed by GitHub
parent 1b143c89e6
commit 19ab6076c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2369,9 +2369,7 @@ USTATUS FfsParser::parseGuidedSectionHeader(const UByteArray & section, const UI
additionalInfo += usprintf("\nChecksum: %08Xh, invalid, should be %08Xh", crc, calculated); additionalInfo += usprintf("\nChecksum: %08Xh, invalid, should be %08Xh", crc, calculated);
msgInvalidCrc = true; msgInvalidCrc = true;
} }
// No need to change dataOffset here
// Adjust dataOffset
dataOffset += sizeof(UINT32);
} }
else if (baGuid == EFI_GUIDED_SECTION_LZMA else if (baGuid == EFI_GUIDED_SECTION_LZMA
|| baGuid == EFI_GUIDED_SECTION_LZMA_HP || baGuid == EFI_GUIDED_SECTION_LZMA_HP