mirror of https://github.com/acidanthera/audk.git
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. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18713 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
df60fb4cc2
commit
8aa6ebe83f
|
@ -286,6 +286,7 @@ FilterSmbiosEntry (
|
|||
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, ' ');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue