From: "Dong, Eric" <eric.dong@intel.com>
To: "Chu, Maggie" <maggie.chu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>,
"Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [PATCH] SecurityPkg/OpalPassword: Add NULL pointer check before using it
Date: Thu, 14 Feb 2019 07:18:30 +0000 [thread overview]
Message-ID: <ED077930C258884BBCB450DB737E662259DB03C5@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20190201104405.14104-1-maggie.chu@intel.com>
Hi Maggie,
Thanks for your contribution.
Reviewed-by: Eric Dong <eric.dong@intel.com>
Pushed: d72d8561fbe03a64e01c2ad57a93777de4b9ae2f
Thanks,
Eric
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Maggie Chu
> Sent: Friday, February 1, 2019 6:44 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Zhang, Chao B <chao.b.zhang@intel.com>
> Subject: [edk2] [PATCH] SecurityPkg/OpalPassword: Add NULL pointer check
> before using it
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=1503
> A pointer variable should be checked if it is NULL or Valid before using it.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Maggie Chu <maggie.chu@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> ---
> SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> index 734c5f06ff..f79f9f7282 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> @@ -436,6 +436,9 @@ BuildOpalDeviceInfoAta (
>
> DevInfoAta = AllocateZeroPool (DevInfoLengthAta);
> ASSERT (DevInfoAta != NULL);
> + if (DevInfoAta == NULL) {
> + return;
> + }
>
> TempDevInfoAta = DevInfoAta;
> TmpDev = mOpalDriver.DeviceList;
> @@ -527,6 +530,9 @@ BuildOpalDeviceInfoNvme (
>
> DevInfoNvme = AllocateZeroPool (DevInfoLengthNvme);
> ASSERT (DevInfoNvme != NULL);
> + if (DevInfoNvme == NULL) {
> + return;
> + }
>
> TempDevInfoNvme = DevInfoNvme;
> TmpDev = mOpalDriver.DeviceList;
> --
> 2.16.2.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2019-02-14 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 10:44 [PATCH] SecurityPkg/OpalPassword: Add NULL pointer check before using it Maggie Chu
2019-02-14 7:18 ` Dong, Eric [this message]
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=ED077930C258884BBCB450DB737E662259DB03C5@shsmsx102.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