From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx.groups.io with SMTP id smtpd.web11.21680.1676482154176082754 for ; Wed, 15 Feb 2023 09:29:14 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm2 header.b=qsVgWXEC; spf=pass (domain: bsdio.com, ip: 66.111.4.27, mailfrom: rebecca@bsdio.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 78FA05C0172; Wed, 15 Feb 2023 12:29:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 15 Feb 2023 12:29:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1676482153; x= 1676568553; bh=Jk/smnvwmzQe5sdljGV2UTn9HPdFCZJRkfCG4JbkY6Q=; b=q sVgWXECHfwpBvDrUj0tV3LRGN+1UwhtZhuoMSLU9Ii3XuwwCl9ZSuSGmBCTi/DgP RbJxgTPIRS83Lqd6YhAJ9rw6JVpOLXwxIN74ynMPb6SHbccSCjf/R3dVE/tVkzhP S1JW0mHK46lbBd/j0F4renbt2AGp62H0XSwlQZweojktjuyuyfFfYIoF2a14bIZK o5nEBWy9y2btZj2/Q2FOuouY2j25pbzzDPsWl5dzvSZr32JsLGFzRjkqAVsctnm8 HrHfIL+halFqhbTCrBzBZZWT997hrlbD7BLa8BnOmKhh/L3+4/EHbUbjKl2MvXF0 nLGWmZY7nHfuFg0VgXeGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1676482153; x= 1676568553; bh=Jk/smnvwmzQe5sdljGV2UTn9HPdFCZJRkfCG4JbkY6Q=; b=P Qv9WlaNIWn6fEMkjAjVuGi8WU4sPm97hx45r6MPjZWXVUqknbI7Ynj0PH7KktBhq 8A/HGP6reEqeDKyoXCrRb1jay7lFw9TkeLBCuMFU7v+hOIMiJmG8e3vHtWvWl9ZT lx8lk55UqQm5BAr3KW4QclYx0l5a50Mu9uSZBAiA8jV+pMSwL0b+bsKRevv+TrOB iH/+wV2iBR6ylNCBJ0TcLOHOgCwHLh51GVIEZ1y5OHTNpJcHfQFkYVViciuDnles g182FTIeqhhyYYreagAamSgiotgFyG7fGG1iywK8c5g2M+C509nun5UprpzXufux 2NqxIabPWl1bs7RF8nLuA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeihedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeevfffgtdffjeefudejleefudejjeetuddvhfegudfhuddtleefgfduueej teevueenucffohhmrghinhepthhirghnohgtohhrvgdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggsvggttggrsegsshguihho rdgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Feb 2023 12:29:12 -0500 (EST) Message-ID: Date: Wed, 15 Feb 2023 10:29:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [edk2-devel] [PATCH 1/1] ArmPkg/SemihostFs: replace SetMem with ZeroMem To: devel@edk2.groups.io, kraxel@redhat.com Cc: Oliver Steffen , Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Pawel Polawski , Jeremy Boone References: <20230215143732.676580-1-kraxel@redhat.com> From: "Rebecca Cran" In-Reply-To: <20230215143732.676580-1-kraxel@redhat.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reviewed-by: Rebecca Cran 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 > Signed-off-by: Gerd Hoffmann > --- > 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;