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

Sami Mujawar sami.mujawar at arm.com
Fri Oct 8 14:06:23 UTC 2021


Hi Pierre,

This patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar at arm.com>

Regards,

Sami Mujawar

On 07/10/2021 04:31 PM, Pierre.Gondois at arm.com wrote:
> 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;

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#81675): https://edk2.groups.io/g/devel/message/81675
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