mirror of https://github.com/acidanthera/audk.git
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:
parent
69da506c92
commit
2fccd1f153
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue