ArmPkg/SemihostFs: replace SetMem with ZeroMem

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>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Gerd Hoffmann 2023-02-15 15:37:32 +01:00 committed by mergify[bot]
parent 69da506c92
commit 2fccd1f153
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ ExtendFile (
} }
Remaining = Size; Remaining = Size;
SetMem (WriteBuffer, 0, sizeof (WriteBuffer)); ZeroMem (WriteBuffer, sizeof (WriteBuffer));
while (Remaining > 0) { while (Remaining > 0) {
WriteNb = MIN (Remaining, sizeof (WriteBuffer)); WriteNb = MIN (Remaining, sizeof (WriteBuffer));
WriteSize = WriteNb; WriteSize = WriteNb;