MdeModulePkg/HiiDatabaseDxe: ASSERT StringPtr
The caller of CompareAndMergeDefaultString has checked that AltCfgResp must contain AltConfigHdr. So we add ASSERT to assume StringPtr is not NULL. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
committed by
Liming Gao
parent
dd6d07bda9
commit
e34022dcbe
@ -909,6 +909,7 @@ CompareAndMergeDefaultString (
|
|||||||
// To find the <AltResp> with AltConfigHdr in AltCfgResp, ignore other <AltResp> which follow it.
|
// To find the <AltResp> with AltConfigHdr in AltCfgResp, ignore other <AltResp> which follow it.
|
||||||
//
|
//
|
||||||
StringPtr = StrStr (*AltCfgResp, AltConfigHdr);
|
StringPtr = StrStr (*AltCfgResp, AltConfigHdr);
|
||||||
|
ASSERT (StringPtr != NULL);
|
||||||
StringPtrNext = StrStr (StringPtr + 1, L"&GUID");
|
StringPtrNext = StrStr (StringPtr + 1, L"&GUID");
|
||||||
if (StringPtrNext != NULL) {
|
if (StringPtrNext != NULL) {
|
||||||
TempCharA = *StringPtrNext;
|
TempCharA = *StringPtrNext;
|
||||||
|
Reference in New Issue
Block a user