diff options
author | Eric Dong <eric.dong@intel.com> | 2015-05-22 05:37:44 +0000 |
---|---|---|
committer | ydong10 <ydong10@Edk2> | 2015-05-22 05:37:44 +0000 |
commit | cbbc454b2ad9ee4359d3a145a3d622c7db22fef6 (patch) | |
tree | 54170811d925c0e89d8ed76590a5ef264e5b8810 /MdeModulePkg/Universal/HiiDatabaseDxe | |
parent | b965bd99c533b24bec56647a8c9b1fa2c2ed8bd8 (diff) | |
download | edk2-platforms-cbbc454b2ad9ee4359d3a145a3d622c7db22fef6.tar.xz |
MdeModulePkg: Validate the return value before use it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17494 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c index 60b5daa95b..dbcf575fa9 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c @@ -2031,6 +2031,7 @@ ExtractConfigRequest ( }
RequestElement = ConstructRequestElement(Name, Offset, Width);
ConfigHdr = ConstructConfigHdr(Storage, DatabaseRecord->DriverHandle);
+ ASSERT (ConfigHdr != NULL);
Length = (StrLen (ConfigHdr) + 1 + StrLen(RequestElement) + 1) * sizeof (CHAR16);
*ConfigRequest = AllocatePool (Length);
@@ -2138,6 +2139,7 @@ ExtractConfigResp ( RequestElement = ConstructRequestElement(Name, Offset, Width);
ConfigHdr = ConstructConfigHdr(Storage, DatabaseRecord->DriverHandle);
+ ASSERT (ConfigHdr != NULL);
Length = (StrLen (ConfigHdr) + 1 + StrLen(RequestElement) + 1 + StrLen (L"VALUE=") + StrLen(ValueElement) + 1) * sizeof (CHAR16);
*ConfigResp = AllocatePool (Length);
|