public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, kraxel@redhat.com
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: [edk2-devel] [PATCH 1/1] ArmPkg/SemihostFs: replace SetMem with ZeroMem
Date: Wed, 15 Feb 2023 10:29:11 -0700	[thread overview]
Message-ID: <dff72da9-baa4-6e2c-c81b-92774ddb60d4@bsdio.com> (raw)
In-Reply-To: <20230215143732.676580-1-kraxel@redhat.com>

Reviewed-by: Rebecca Cran <rebecca@bsdio.com>

On 2/15/23 07:37, 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;


  reply	other threads:[~2023-02-15 17:29 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 ` Rebecca Cran [this message]
2023-02-21 14:21 ` Sami Mujawar
2023-03-09  9:16 ` Gerd Hoffmann
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=dff72da9-baa4-6e2c-c81b-92774ddb60d4@bsdio.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