Skip to content
Browse files

MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression

Fix the incorrect comparison between pointer and constant zero character.

V2: The pointer StringPtr points to a string returned
by ExtractConfig/ExportConfig, if it is NULL, function
InternalHiiIfrValueAction will return FALSE. So in
current usage model, the StringPtr can not be NULL before
using it, so we can add ASSERT here.

Cc: Eric Dong <>
Cc: Liming Gao <>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <>
Reviewed-by: Eric Dong <>
  • Loading branch information...
dandanbi authored and hwu25 committed Apr 1, 2017
1 parent 490433a commit fe4a28ccbfd33cae9e1f56b174d46b4eb2329efd
Showing with 3 additions and 2 deletions.
  1. +3 −2 MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -2201,8 +2201,9 @@ InternalHiiIfrValueAction (

StringPtr = ConfigAltResp;

while (StringPtr != L'\0') {
ASSERT (StringPtr != NULL);

while (*StringPtr != L'\0') {
// 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...

0 comments on commit fe4a28c

Please sign in to comment.
You can’t perform that action at this time.