diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index cd0cd35a0f..583b9e516c 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -1607,7 +1607,7 @@ ValidateQuestionFromVfr ( break; } // - // Get Width by OneOf Flags + // Get the Max size of the string. // Width = (UINT16) (IfrString->MaxSize * sizeof (UINT16)); if (NameValueType) { @@ -1621,6 +1621,10 @@ ValidateQuestionFromVfr ( // break; } + // + // Skip the VarName. + // + StringPtr += StrLen (QuestionName); // // Skip the "=". @@ -1629,8 +1633,13 @@ ValidateQuestionFromVfr ( // // Check current string length is less than maxsize + // e.g Config String: "0041004200430044", Unicode String: "ABCD". Unicode String length = Config String length / 4. + // Config string format in UEFI spec. + // ::=