mirror of https://github.com/acidanthera/audk.git
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:
parent
6c6c850ad6
commit
b3d4217001
|
@ -715,14 +715,15 @@ AddImageExeInfo (
|
||||||
|
|
||||||
if (Name != NULL) {
|
if (Name != NULL) {
|
||||||
NameStringLen = StrSize (Name);
|
NameStringLen = StrSize (Name);
|
||||||
|
} else {
|
||||||
|
NameStringLen = sizeof (CHAR16);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageExeInfoTable = NULL;
|
|
||||||
EfiGetSystemConfigurationTable (&gEfiImageSecurityDatabaseGuid, (VOID **) &ImageExeInfoTable);
|
EfiGetSystemConfigurationTable (&gEfiImageSecurityDatabaseGuid, (VOID **) &ImageExeInfoTable);
|
||||||
if (ImageExeInfoTable != NULL) {
|
if (ImageExeInfoTable != NULL) {
|
||||||
//
|
//
|
||||||
// The table has been found!
|
// 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);
|
ImageExeInfoTableSize = GetImageExeInfoTableSize (ImageExeInfoTable);
|
||||||
} else {
|
} else {
|
||||||
|
@ -755,6 +756,8 @@ AddImageExeInfo (
|
||||||
|
|
||||||
if (Name != NULL) {
|
if (Name != NULL) {
|
||||||
CopyMem ((UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32), Name, NameStringLen);
|
CopyMem ((UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32), Name, NameStringLen);
|
||||||
|
} else {
|
||||||
|
ZeroMem ((UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32), sizeof (CHAR16));
|
||||||
}
|
}
|
||||||
CopyMem (
|
CopyMem (
|
||||||
(UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32) + NameStringLen,
|
(UINT8 *) &ImageExeInfoEntry->InfoSize + sizeof (UINT32) + NameStringLen,
|
||||||
|
|
Loading…
Reference in New Issue