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>
);\r
free (ExtractionTool);\r
\r
+ if (!CompareGuid (\r
+ EfiGuid,\r
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid\r
+ )\r
+ ) {\r
+ DataOffset -= 4;\r
+ }\r
Status =\r
PutFileImage (\r
ToolInputFile,\r