From: "Ard Biesheuvel" <ardb@kernel.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, Oliver Steffen <osteffen@redhat.com>,
Sami Mujawar <sami.mujawar@arm.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Pawel Polawski <ppolawsk@redhat.com>,
Jeremy Boone <jeremy.boone@nccgroup.com>
Subject: Re: [PATCH 1/1] ArmPkg/SemihostFs: replace SetMem with ZeroMem
Date: Thu, 9 Mar 2023 10:18:50 +0100 [thread overview]
Message-ID: <CAMj1kXHL4w5yjNeWm0LENfkg50Ds8BJY4S2vPTUodCvXeNwQAA@mail.gmail.com> (raw)
In-Reply-To: <20230309091636.5kk3hlysdirhfyrh@sirius.home.kraxel.org>
On Thu, 9 Mar 2023 at 10:16, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Ping. Two reviews and the freeze is over. Merge this now?
>
Pong. Thanks for the reminder - I'll go and merge this.
> On Wed, Feb 15, 2023 at 03:37:32PM +0100, Gerd Hoffmann wrote:
> > SetMem arguments 2+3 are in the wrong order, resulting in
> > the call having no effect because Length is zero.
> >
> > Fix this by using ZeroMem instead.
> >
> > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4205
> > Reported-by: Jeremy Boone <jeremy.boone@nccgroup.com>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> > ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
> > index 39a30533ee57..9cc9ed7d3637 100644
> > --- a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
> > +++ b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
> > @@ -574,7 +574,7 @@ ExtendFile (
> > }
> >
> > Remaining = Size;
> > - SetMem (WriteBuffer, 0, sizeof (WriteBuffer));
> > + ZeroMem (WriteBuffer, sizeof (WriteBuffer));
> > while (Remaining > 0) {
> > WriteNb = MIN (Remaining, sizeof (WriteBuffer));
> > WriteSize = WriteNb;
> > --
> > 2.39.1
> >
>
> --
>
prev parent reply other threads:[~2023-03-09 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 14:37 [PATCH 1/1] ArmPkg/SemihostFs: replace SetMem with ZeroMem Gerd Hoffmann
2023-02-15 17:29 ` [edk2-devel] " Rebecca Cran
2023-02-21 14:21 ` Sami Mujawar
2023-03-09 9:16 ` Gerd Hoffmann
2023-03-09 9:18 ` Ard Biesheuvel [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=CAMj1kXHL4w5yjNeWm0LENfkg50Ds8BJY4S2vPTUodCvXeNwQAA@mail.gmail.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