Add a NULL string to the Image Execution Information Table if the Name is NULL in function AddImageExeInfo().

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting  <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13990 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
sfu5 2012-12-12 03:03:07 +00:00
parent 6c6c850ad6
commit b3d4217001
1 changed files with 5 additions and 2 deletions

View File

@ -715,14 +715,15 @@ AddImageExeInfo (
if (Name != NULL) {
NameStringLen = StrSize (Name);
} else {
NameStringLen = sizeof (CHAR16);
}
ImageExeInfoTable = NULL;
EfiGetSystemConfigurationTable (&gEfiImageSecurityDatabaseGuid, (VOID **) &ImageExeInfoTable);
if (ImageExeInfoTable != NULL) {
//
// The table has been found!
// We must enlarge the table to accmodate the new exe info entry.
// We must enlarge the table to accomodate the new exe info entry.
//
ImageExeInfoTableSize = GetImageExeInfoTableSize (ImageExeInfoTable);
} else {
@ -755,6 +756,8 @@ AddImageExeInfo (
if (Name != NULL) {
CopyMem ((UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32), Name, NameStringLen);
} else {
ZeroMem ((UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32), sizeof (CHAR16));
}
CopyMem (
(UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32) + NameStringLen,