BaseTools/VolInfo: Correct buffer for GenCrc32 tool

If the guided section was encoded with GenCrc32 tool the resulting
'EFI_GUID_DEFINED_SECTION.DataOffset' field points to the start of
the meaningfull data that follows the CRC32 value.
But if we want to decode the section with GenCrc32 tool we need to
provide a buffer that includes the CRC32 value itself.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Konstantin Aladyshev 2022-07-19 21:44:35 +08:00 committed by mergify[bot]
parent 6a2b20ff97
commit 9fc029ee62
1 changed files with 7 additions and 0 deletions

View File

@ -2009,6 +2009,13 @@ Returns:
);
free (ExtractionTool);
if (!CompareGuid (
EfiGuid,
&gEfiCrc32GuidedSectionExtractionProtocolGuid
)
) {
DataOffset -= 4;
}
Status =
PutFileImage (
ToolInputFile,