BaseTools/Source/C/GenSec: Fix EFI_SECTION_FREEFORM_SUBTYPE_GUID header

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4021

When the size of a EFI_SECTION_FREEFORM_SUBTYPE_GUID section required
the use of EFI_FREEFORM_SUBTYPE_GUID_SECTION2 header, set the section
type to EFI_SECTION_FREEFORM_SUBTYPE_GUID.

Cc: Leif Lindholm <llindhol@qti.qualcomm.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Konstantin Aladyshev <aladyshev22@gmail.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Leif Lindholm <llindhol@qti.qualcomm.com>
This commit is contained in:
Michael D Kinney 2022-08-15 18:15:24 -07:00 committed by mergify[bot]
parent 68bf712d4f
commit e2ac68a23b
1 changed files with 1 additions and 1 deletions

View File

@ -1112,7 +1112,7 @@ Returns:
//
if (TotalLength >= MAX_SECTION_SIZE) {
SubtypeGuidSect2 = (EFI_FREEFORM_SUBTYPE_GUID_SECTION2 *) FileBuffer;
SubtypeGuidSect2->CommonHeader.Type = EFI_SECTION_GUID_DEFINED;
SubtypeGuidSect2->CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID;
SubtypeGuidSect2->CommonHeader.Size[0] = (UINT8) 0xff;
SubtypeGuidSect2->CommonHeader.Size[1] = (UINT8) 0xff;
SubtypeGuidSect2->CommonHeader.Size[2] = (UINT8) 0xff;