diff options
author | Shenglei Zhang <shenglei.zhang@intel.com> | 2019-10-15 10:44:14 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-11-06 13:26:21 +0800 |
commit | e34022dcbe64996d0fc8be0b1b8e09ae7134216c (patch) | |
tree | 6c0a32f8963ab916f9ae93a48527e8251ac25b99 | |
parent | dd6d07bda9e7ab3e4080d7be8bc140ded9a93eed (diff) | |
download | edk2-e34022dcbe64996d0fc8be0b1b8e09ae7134216c.zip edk2-e34022dcbe64996d0fc8be0b1b8e09ae7134216c.tar.gz edk2-e34022dcbe64996d0fc8be0b1b8e09ae7134216c.tar.bz2 |
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>
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 71ea25b..2cad6d2 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -909,6 +909,7 @@ CompareAndMergeDefaultString ( // To find the <AltResp> with AltConfigHdr in AltCfgResp, ignore other <AltResp> which follow it.
//
StringPtr = StrStr (*AltCfgResp, AltConfigHdr);
+ ASSERT (StringPtr != NULL);
StringPtrNext = StrStr (StringPtr + 1, L"&GUID");
if (StringPtrNext != NULL) {
TempCharA = *StringPtrNext;
|