Revision: 17494
          http://sourceforge.net/p/edk2/code/17494
Author:   ydong10
Date:     2015-05-22 05:37:44 +0000 (Fri, 22 May 2015)
Log Message:
-----------
MdeModulePkg: Validate the return value before use it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c

Modified: 
trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c     
2015-05-21 07:58:12 UTC (rev 17493)
+++ trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c     
2015-05-22 05:37:44 UTC (rev 17494)
@@ -2031,6 +2031,7 @@
       }
       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 @@
       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);


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to