[edk2-devel] [PATCH v2 02/21] DynamicTablesPkg: Add missing parameter check

PierreGondois pierre.gondois at arm.com
Thu Oct 7 15:31:51 UTC 2021


From: Pierre Gondois <Pierre.Gondois at arm.com>

Add missing check of 'AcpiTableInfo' in AddAcpiHeader().

Signed-off-by: Pierre Gondois <Pierre.Gondois at arm.com>
---

Notes:
    v2:
    - New patch. [Pierre]

 DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
index 9249e6b87f70..f98da7ffdd67 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
@@ -122,11 +122,13 @@ AddAcpiHeader (
   ASSERT (CfgMgrProtocol != NULL);
   ASSERT (Generator != NULL);
   ASSERT (AcpiHeader != NULL);
+  ASSERT (AcpiTableInfo != NULL);
   ASSERT (Length >= sizeof (EFI_ACPI_DESCRIPTION_HEADER));
 
   if ((CfgMgrProtocol == NULL) ||
       (Generator == NULL) ||
       (AcpiHeader == NULL) ||
+      (AcpiTableInfo == NULL) ||
       (Length < sizeof (EFI_ACPI_DESCRIPTION_HEADER))
     ) {
     return EFI_INVALID_PARAMETER;
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#81584): https://edk2.groups.io/g/devel/message/81584
Mute This Topic: https://groups.io/mt/86148194/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list