From: "Liming Gao" <liming.gao@intel.com>
To: "Jiang, Guomin" <guomin.jiang@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"newexplorerj@gmail.com" <newexplorerj@gmail.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v3] MdePkg/UnitTestBaseLib: Add check for pointer BinData
Date: Mon, 23 Mar 2020 13:33:55 +0000 [thread overview]
Message-ID: <06db8303487e47dc9d1cd165447bf8f8@intel.com> (raw)
In-Reply-To: <B1F5B0856690F44595CF70FED755C93954947B@SHSMSX101.ccr.corp.intel.com>
Guomin:
The change is ok to me. Reviewed-by: Liming Gao <liming.gao@intel.com>
Thanks
Liming
> -----Original Message-----
> From: Jiang, Guomin <guomin.jiang@intel.com>
> Sent: Monday, March 23, 2020 2:12 PM
> To: devel@edk2.groups.io; newexplorerj@gmail.com
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [edk2-devel] [PATCH v3] MdePkg/UnitTestBaseLib: Add check for pointer BinData
>
> Hi Michael, Liming,
>
> Could you help review the patch.
>
> Thanks.
>
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > GuoMinJ
> > Sent: Thursday, March 5, 2020 1:58 PM
> > To: devel@edk2.groups.io
> > Cc: GuoMinJ <newexplorerj@gmail.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> > Subject: [edk2-devel] [PATCH v3] MdePkg/UnitTestBaseLib: Add check for
> > pointer BinData
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2531
> >
> > AllocatePool may fail and BinData may be invalid, check it before use.
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
> > ---
> > MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c
> > b/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c
> > index 6f7c31cab4..933d2b40e0 100644
> > --- a/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c
> > +++ b/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c
> > @@ -252,6 +252,9 @@ RfcDecodeTest(
> > BinSize = AsciiStrnLenS (binString, MAX_TEST_STRING_SIZE);
> >
> > BinData = AllocatePool (BinSize);
> > + if (BinData == NULL) {
> > + return UNIT_TEST_ERROR_TEST_FAILED; }
> > Btc->BufferToFree = BinData;
> >
> > ReturnSize = BinSize;
> > --
> > 2.17.1
> >
> >
> >
next prev parent reply other threads:[~2020-03-23 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 5:58 [PATCH v3] MdePkg/UnitTestBaseLib: Add check for pointer BinData GuoMinJ
2020-03-23 6:11 ` [edk2-devel] " Guomin Jiang
2020-03-23 13:33 ` Liming Gao [this message]
2020-03-23 18:16 ` Michael D Kinney
2020-03-23 21:54 ` Bret Barkelew
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=06db8303487e47dc9d1cd165447bf8f8@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