From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
"sergei@posteo.net" <sergei@posteo.net>
Cc: "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/3] ShellPkg/HttpDynamicCommand: Fix possible uninitialized use
Date: Wed, 19 May 2021 02:21:05 +0000 [thread overview]
Message-ID: <MWHPR11MB164778342919FC4A35FA62E0F62B9@MWHPR11MB1647.namprd11.prod.outlook.com> (raw)
In-Reply-To: <000201d74c4c$328d5e70$97a81b50$@byosoft.com.cn>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Thanks,
Zhichao
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Wednesday, May 19, 2021 9:13 AM
> To: devel@edk2.groups.io; sergei@posteo.net
> Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: 回复: [edk2-devel] [PATCH v2 1/3] ShellPkg/HttpDynamicCommand:
> Fix possible uninitialized use
>
> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
> This fix is clear.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sergei
> Dmitrouk
> > 发送时间: 2021年5月19日 0:10
> > 收件人: devel@edk2.groups.io
> > 抄送: Ray Ni <ray.ni@intel.com>; Zhichao Gao <zhichao.gao@intel.com>
> > 主题: [edk2-devel] [PATCH v2 1/3] ShellPkg/HttpDynamicCommand: Fix
> > possible uninitialized use
> >
> > `Status` can be used uninitialized:
> >
> > /* Evaluates to FALSE */
> > if (ShellGetExecutionBreakFlag ()) {
> > Status = EFI_ABORTED;
> > break;
> > }
> >
> > /* Evaluates to FALSE */
> > if (!Context->ContentDownloaded && !Context->ResponseToken.Event)
> {
> > Status = ...;
> > ASSERT_EFI_ERROR (Status);
> > } else {
> > ResponseMessage.Data.Response = NULL;
> > }
> >
> > /* UNINITIALIZED USE */
> > if (EFI_ERROR (Status)) {
> > break;
> > }
> >
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Signed-off-by: Sergei Dmitrouk <sergei@posteo.net>
> > ---
> > ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
> > b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
> > index 3735a4a7e645..7b9b2d238015 100644
> > --- a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
> > +++ b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
> > @@ -1524,6 +1524,7 @@ GetResponse (
> > Context->ResponseToken.Message = &ResponseMessage;
> > Context->ContentLength = 0;
> > Context->Status = REQ_OK;
> > + Status = EFI_SUCCESS;
> > MsgParser = NULL;
> > ResponseData.StatusCode = HTTP_STATUS_UNSUPPORTED_STATUS;
> > ResponseMessage.Data.Response = &ResponseData;
> > --
> > 2.17.6
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
next prev parent reply other threads:[~2021-05-19 2:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 16:09 [PATCH v1 0/3] Fix possible uninitialized uses Sergei Dmitrouk
2021-05-18 16:09 ` [PATCH v2 1/3] ShellPkg/HttpDynamicCommand: Fix possible uninitialized use Sergei Dmitrouk
2021-05-19 1:13 ` 回复: [edk2-devel] " gaoliming
2021-05-19 2:21 ` Gao, Zhichao [this message]
2021-05-18 16:09 ` [PATCH v2 2/3] MdeModulePkg/PciBusDxe: " Sergei Dmitrouk
2021-05-19 1:08 ` Wu, Hao A
2021-05-18 16:09 ` [PATCH v2 3/3] CryptoPkg/BaseCryptLib: " Sergei Dmitrouk
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=MWHPR11MB164778342919FC4A35FA62E0F62B9@MWHPR11MB1647.namprd11.prod.outlook.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