From: "Gao, Liming" <liming.gao@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [patch] MdePkg: Check input Ptrs in GetSectionFromAnyFvByFileType
Date: Tue, 20 Nov 2018 03:51:10 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E36EF40@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20181119020833.22748-2-dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, November 19, 2018 10:09 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [patch] MdePkg: Check input Ptrs in GetSectionFromAnyFvByFileType
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1337
>
> In function GetSectionFromAnyFvByFileType, the input parameter "Buffer"
> and "size" should not be NULL, so add ASSERT here to avoid any checker
> report that the NULL pointer may be used.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
> MdePkg/Library/DxeServicesLib/DxeServicesLib.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c
> index d4f366425f..e78d51cb92 100644
> --- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c
> +++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c
> @@ -251,10 +251,13 @@ GetSectionFromAnyFvByFileType (
> UINTN Key;
> EFI_GUID NameGuid;
> EFI_FV_FILE_ATTRIBUTES Attributes;
> EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
>
> + ASSERT (Buffer != NULL);
> + ASSERT (Size != NULL);
> +
> //
> // Locate all available FVs.
> //
> HandleBuffer = NULL;
> Status = gBS->LocateHandleBuffer (
> --
> 2.18.0.windows.1
next prev parent reply other threads:[~2018-11-20 3:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 2:08 [patch] MdePkg: check Length para before use in DevPathToTextUsbWWID Dandan Bi
2018-11-19 2:08 ` [patch] MdePkg: Check input Ptrs in GetSectionFromAnyFvByFileType Dandan Bi
2018-11-20 3:51 ` Gao, Liming [this message]
2018-11-20 3:49 ` [patch] MdePkg: check Length para before use in DevPathToTextUsbWWID Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E36EF40@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox