audk/MdeModulePkg
Dandan Bi 7f8aabef15 MdeModulePkg/HiiDB: Fix incorrect structure convention for checkbox
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1224

When covert IFR binary to EFI_IFR_CHECKBOX structure,
Current code has following incorrect code logic:
IfrCheckBox = (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1);
The correct one should be:
IfrCheckBox = (EFI_IFR_CHECKBOX *) IfrOpHdr;

1. The bug is in function "UpdateDefaultSettingInFormPackage()"
which is to update the default setting of some HII Questions
in the IFR binary data. So it only has impact when platform
overrides default setting in HII VarStore through DynamicHii
PCD setting in Platform DSC file. If platform doesn't
override default setting, it has no impact.

2. The implementation updates the "Flags" filed in the
EFI_IFR_CHECKBOX structure to update the default
setting of checkbox.
If using "IfrCheckBox = (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1);"
when wants to update the " Flags" filed in checkbox,
but in fact it will update the opcode binary
data(opcode binary length) behind checkbox binary.
And then it will cause Browser can't parse the IFR
binary data correctly. And then the possible symptom
is that some HII Question and forms may be not parsed
and then cannot be shown.

This patch is to fix this bug.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-10-09 22:20:08 +08:00
..
Application MdeModulePkg CapsuleApp:Remove two redundant Guids 2018-09-21 11:34:42 +08:00
Bus MdeModulePkg/PciHostBridge: Move declaration of mIoMmu to header file 2018-09-26 12:12:53 +08:00
Core MdeModulePkg/DxeIpl: support more NX related PCDs 2018-09-26 08:55:10 +08:00
Include MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Library MdeModulePkg Lzma: Update LZMA SDK version to 18.05 2018-10-09 09:31:10 +08:00
Logo MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Universal MdeModulePkg/HiiDB: Fix incorrect structure convention for checkbox 2018-10-09 22:20:08 +08:00
MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec/.uni: clarify PCDs usage 2018-09-26 08:55:09 +08:00
MdeModulePkg.dsc MdeModulePkg: Remove PalLib in dsc which was missed at de00522 2018-09-25 23:40:40 +08:00
MdeModulePkg.uni MdeModulePkg/MdeModulePkg.dec/.uni: clarify PCDs usage 2018-09-26 08:55:09 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00