Hi Gerd,

Thank you for this patch.

Reviewed-by: Sami Mujawar <sami.muja...@arm.com>

Regards,

Sami Mujawar

On 15/02/2023, 14:37, "Gerd Hoffmann" <kra...@redhat.com 
<mailto:kra...@redhat.com>> 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 
<https://bugzilla.tianocore.org/show_bug.cgi?id=4205>
Reported-by: Jeremy Boone <jeremy.bo...@nccgroup.com 
<mailto:jeremy.bo...@nccgroup.com>>
Signed-off-by: Gerd Hoffmann <kra...@redhat.com <mailto:kra...@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







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100414): https://edk2.groups.io/g/devel/message/100414
Mute This Topic: https://groups.io/mt/96983558/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to