From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10535.1633704403128097183 for ; Fri, 08 Oct 2021 07:46:43 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C587C11FB; Fri, 8 Oct 2021 07:46:38 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.73.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D2BA73F66F; Fri, 8 Oct 2021 07:46:37 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sami Mujawar , Alexei.Fedorov@arm.com Subject: [PATCH v3 02/21] DynamicTablesPkg: Add missing parameter check Date: Fri, 8 Oct 2021 15:46:13 +0100 Message-Id: <20211008144632.31894-3-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211008144632.31894-1-Pierre.Gondois@arm.com> References: <20211008144632.31894-1-Pierre.Gondois@arm.com> From: Pierre Gondois Add missing check of 'AcpiTableInfo' in AddAcpiHeader(). Reviewed-by: Sami Mujawar Signed-off-by: Pierre Gondois --- 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