diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2022-07-19 21:44:35 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-10-02 05:34:38 +0000 |
commit | 9fc029ee6248e7998a478e02dc1abf82ac8ae376 (patch) | |
tree | ef3f73f74715f696e851460c404696d0323ba318 /BaseTools | |
parent | 6a2b20ff97e4256970644a07f74a4c5655bf5072 (diff) | |
download | edk2-9fc029ee6248e7998a478e02dc1abf82ac8ae376.zip edk2-9fc029ee6248e7998a478e02dc1abf82ac8ae376.tar.gz edk2-9fc029ee6248e7998a478e02dc1abf82ac8ae376.tar.bz2 |
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>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/C/VolInfo/VolInfo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c index 135924e..184d753 100644 --- a/BaseTools/Source/C/VolInfo/VolInfo.c +++ b/BaseTools/Source/C/VolInfo/VolInfo.c @@ -2009,6 +2009,13 @@ Returns: );
free (ExtractionTool);
+ if (!CompareGuid (
+ EfiGuid,
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid
+ )
+ ) {
+ DataOffset -= 4;
+ }
Status =
PutFileImage (
ToolInputFile,
|