public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: 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:16:36 +0100	[thread overview]
Message-ID: <20230309091636.5kk3hlysdirhfyrh@sirius.home.kraxel.org> (raw)
In-Reply-To: <20230215143732.676580-1-kraxel@redhat.com>

Ping.  Two reviews and the freeze is over.  Merge this now?

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
> 

-- 


  parent reply	other threads:[~2023-03-09  9:16 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 [this message]
2023-03-09  9:18   ` Ard Biesheuvel

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=20230309091636.5kk3hlysdirhfyrh@sirius.home.kraxel.org \
    --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