From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <gaoliming@byosoft.com.cn>,
"'Walon Li'" <walon.li@hpe.com>
Cc: <nickle.wang@hpe.com>, <dandan.bi@intel.com>
Subject: 回复: [edk2-devel] 回复: [PATCH] MdeModulePkg/PlatformDriOverrideDxe: Fix overflow condition check
Date: Fri, 21 May 2021 13:40:07 +0800 [thread overview]
Message-ID: <005901d74e03$c1aba900$4502fb00$@byosoft.com.cn> (raw)
In-Reply-To: <167E81CF2BD0E45A.10691@groups.io>
Create PR https://github.com/tianocore/edk2/pull/1658.
This patch passed code review before soft feature freeze. So, I merge it for
this stable tag.
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 gaoliming
> 发送时间: 2021年5月13日 11:14
> 收件人: 'Walon Li' <walon.li@hpe.com>; devel@edk2.groups.io
> 抄送: nickle.wang@hpe.com; dandan.bi@intel.com
> 主题: [edk2-devel] 回复: [PATCH] MdeModulePkg/PlatformDriOverrideDxe:
> Fix overflow condition check
>
> Agree this fix. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
> > -----邮件原件-----
> > 发件人: Walon Li <walon.li@hpe.com>
> > 发送时间: 2021年5月13日 10:49
> > 收件人: devel@edk2.groups.io
> > 抄送: walon.li@hpe.com; nickle.wang@hpe.com; dandan.bi@intel.com;
> > gaoliming@byosoft.com.cn
> > 主题: [PATCH] MdeModulePkg/PlatformDriOverrideDxe: Fix overflow
> > condition check
> >
> > Code mistake, VariableIndex is smaller normally than buffer+buffersize
> > so should not break loop.
> >
> > Signed-off-by:Walon Li <walon.li@hpe.com>
> > ---
> > .../Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
> > b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
> > index f91f038b7a..bd2d04452f 100644
> > ---
> a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
> > +++
> > b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
> > @@ -776,7 +776,7 @@ InitOverridesMapping (
> > // Check buffer overflow
> >
> > //
> >
> > if ((DriverImageInfo->DriverImagePath == NULL) ||
> (VariableIndex
> > < (UINT8 *) DriverDevicePath) ||
> >
> > - (VariableIndex < (UINT8 *) VariableBuffer + BufferSize)) {
> >
> > + (VariableIndex > (UINT8 *) VariableBuffer + BufferSize)) {
> >
> > Corrupted = TRUE;
> >
> > break;
> >
> > }
> >
> > --
> > 2.23.0.windows.1
>
>
>
>
>
>
>
prev parent reply other threads:[~2021-05-21 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 2:48 [PATCH] MdeModulePkg/PlatformDriOverrideDxe: Fix overflow condition check Li, Walon
2021-05-13 3:13 ` 回复: " gaoliming
[not found] ` <167E81CF2BD0E45A.10691@groups.io>
2021-05-21 5:40 ` 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='005901d74e03$c1aba900$4502fb00$@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