Reviewed-by: Liming Gao <[email protected]> >-----Original Message----- >From: Bi, Dandan >Sent: Monday, October 08, 2018 9:29 AM >To: [email protected] >Cc: Gao, Liming <[email protected]>; Zeng, Star <[email protected]> >Subject: [patch] 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; > >This patch is to fix this bug. > >Cc: Liming Gao <[email protected]> >Cc: Star Zeng <[email protected]> >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Dandan Bi <[email protected]> >--- > MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c >b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c >index 45448c5198..664687796f 100644 >--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c >+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c >@@ -896,11 +896,11 @@ UpdateDefaultSettingInFormPackage ( > break; > case EFI_IFR_CHECKBOX_OP: > IfrScope = IfrOpHdr->Scope; > IfrQuestionType = IfrOpHdr->OpCode; > IfrQuestionHdr = (EFI_IFR_QUESTION_HEADER *) (IfrOpHdr + 1); >- IfrCheckBox = (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1); >+ IfrCheckBox = (EFI_IFR_CHECKBOX *) IfrOpHdr; > EfiVarStoreIndex = IsEfiVarStoreQuestion (IfrQuestionHdr, > EfiVarStoreList, >EfiVarStoreNumber); > Width = sizeof (BOOLEAN); > if (EfiVarStoreIndex < EfiVarStoreNumber) { > for (Index = 0; Index < DefaultIdNumber; Index ++) { > if (DefaultIdList[Index] == EFI_HII_DEFAULT_CLASS_STANDARD) { >-- >2.18.0.windows.1
_______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

