From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <bret.barkelew@microsoft.com>,
<hao.a.wu@intel.com>, "'Bret Barkelew'" <bret@corthon.com>
Cc: "'Wang, Jian J'" <jian.j.wang@intel.com>
Subject: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in VarCheckPolicyLib
Date: Tue, 13 Apr 2021 09:07:30 +0800 [thread overview]
Message-ID: <00cd01d73001$614ebe50$23ec3af0$@byosoft.com.cn> (raw)
In-Reply-To: <MW4PR21MB1907B72EF12891D70FBD003AEF709@MW4PR21MB1907.namprd21.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 3784 bytes --]
I create PR https://github.com/tianocore/edk2/pull/1557 for this patch.
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Bret Barkelew via
groups.io
发送时间: 2021年4月13日 0:24
收件人: devel@edk2.groups.io; hao.a.wu@intel.com; Bret Barkelew
<bret@corthon.com>
抄送: Wang, Jian J <jian.j.wang@intel.com>
主题: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize temp variable
in VarCheckPolicyLib
Looks like we have the requisite approvals. Shall I create a PR?
- Bret
From: Wu, Hao A via groups.io <mailto:hao.a.wu=intel.com@groups.io>
Sent: Sunday, April 11, 2021 7:23 PM
To: Bret Barkelew <mailto:bret@corthon.com> ; devel@edk2.groups.io
<mailto:devel@edk2.groups.io>
Cc: Wang, Jian J <mailto:jian.j.wang@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize
temp variable in VarCheckPolicyLib
> -----Original Message-----
> From: Bret Barkelew <bret@corthon.com <mailto:bret@corthon.com> >
> Sent: Saturday, April 10, 2021 2:25 AM
> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Cc: Wang, Jian J <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >;
Wu, Hao A <hao.a.wu@intel.com <mailto:hao.a.wu@intel.com> >
> Subject: [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in
> VarCheckPolicyLib
>
> DumpVariablePolicy() will return EFI_INVALID_PARAMETER if the Buffer
> pointer is NULL and the indirect Size is anything but 0. Since this
TempSize
> was not being initialized it is very likely that this sequence would not
return
> the total buffer size as expected.
>
> Bugzilla:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.t
ianocore.org%2Fshow_bug.cgi%3Fid%3D3310 <https://nam06.safelinks.protection.
outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D
3310&data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cdd597013a0874fa676f7
08d8fd5a02e2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637537910324146700
%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
iLCJXVCI6Mn0%3D%7C1000&sdata=qxCQ6vccJFzG8gH9qDBHD9xnl%2FCs3DdVUuMtHspan
fY%3D&reserved=0>
&data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cdd597013a0874fa676f708d8
fd5a02e2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637537910324146700%7CU
nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
XVCI6Mn0%3D%7C1000&sdata=qxCQ6vccJFzG8gH9qDBHD9xnl%2FCs3DdVUuMtHspanfY%3
D&reserved=0
>
> Cc: Jian J Wang <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >
> Cc: Hao A Wu <hao.a.wu@intel.com <mailto:hao.a.wu@intel.com> >
> Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com
<mailto:bret.barkelew@microsoft.com> >
> ---
> MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> index 14e1904e96d3..e50edb4ffc5a 100644
> --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> @@ -216,6 +216,7 @@ VarCheckPolicyLibMmiHandler (
> DumpParamsOut->TotalSize = 0;
> DumpParamsOut->PageSize = 0;
> DumpParamsOut->HasMore = FALSE;
> + TempSize = 0;
> SubCommandStatus = DumpVariablePolicy (NULL, &TempSize);
Reviewed-by: Hao A Wu <hao.a.wu@intel.com <mailto:hao.a.wu@intel.com> >
Best Regards,
Hao Wu
> if (SubCommandStatus == EFI_BUFFER_TOO_SMALL && TempSize > 0) {
> mCurrentPaginationCommand =
> VAR_CHECK_POLICY_COMMAND_DUMP;
> --
> 2.28.0.windows.1
[-- Attachment #2: Type: text/html, Size: 8089 bytes --]
prev parent reply other threads:[~2021-04-13 1:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 18:25 [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in VarCheckPolicyLib Bret Barkelew
2021-04-09 18:33 ` [EXTERNAL] [edk2-devel] " Bret Barkelew
2021-04-12 1:36 ` 回复: " gaoliming
2021-04-12 2:23 ` Wu, Hao A
2021-04-12 16:23 ` Bret Barkelew
2021-04-13 1:07 ` gaoliming [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='00cd01d73001$614ebe50$23ec3af0$@byosoft.com.cn' \
--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