Revision: 18820
          http://sourceforge.net/p/edk2/code/18820
Author:   vanjeff
Date:     2015-11-16 08:18:40 +0000 (Mon, 16 Nov 2015)
Log Message:
-----------
MdeModulePkg SmbiosMeasurementDxe: NULL check to String from GetSmbiosStringById

When StringId is not 0, String returned from GetSmbiosStringById is expected to 
non-NULL.
Add ASSERT (String != NULL); to ensure this.

(Sync patch r18713 from main trunk.)

Cc: Jiewen Yao <[email protected]>
Cc: Shumin Qiu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Reviewed-by: Shumin Qiu <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/18713

Modified Paths:
--------------
    
branches/UDK2015/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c

Modified: 
branches/UDK2015/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
===================================================================
--- 
branches/UDK2015/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
 2015-11-16 08:18:01 UTC (rev 18819)
+++ 
branches/UDK2015/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
 2015-11-16 08:18:40 UTC (rev 18820)
@@ -286,6 +286,7 @@
           if (StringId != 0) {
             // set ' ' for string field
             String = GetSmbiosStringById (TableEntry, StringId, &StringLen);
+            ASSERT (String != NULL);
             //DEBUG ((EFI_D_INFO,"StrId(0x%x)-%a(%d)\n", StringId, String, 
StringLen));
             SetMem (String, StringLen, ' ');
           }


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to