DynamicTablesPkg: DynamicTableManagerDxe: Fix NULL pointer dereference

BuildAndInstallMultipleSmbiosTables() can dereference a NULL pointer if the
SMBIOS table builder returns a NULL CmObjToken array.

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
This commit is contained in:
Sarah Walker
2025-07-18 14:44:17 +01:00
committed by mergify[bot]
parent 6979b733ac
commit 3e62dbf504

View File

@ -264,7 +264,7 @@ BuildAndInstallMultipleSmbiosTables (
Status = TableFactoryProtocol->AddSmbiosHandle (
SmbiosProtocol,
&TableHandle,
CmObjToken[Index],
CmObjToken ? CmObjToken[Index] : CM_NULL_TOKEN,
SmbiosTableInfo->TableGeneratorId
);
if (EFI_ERROR (Status)) {