qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/acpi/erst.c: Fix memset argument order
@ 2022-10-19 19:15 Christian A. Ehrhardt
  2022-10-19 19:37 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Christian A. Ehrhardt @ 2022-10-19 19:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Christian A. Ehrhardt, Eric DeVolder, qemu-stable,
	Michael S. Tsirkin, Igor Mammedov, Ani Sinha

Fix memset argument order: The second argument is
the value, the length goes last.

Cc: Eric DeVolder <eric.devolder@oracle.com>
Cc: qemu-stable@nongnu.org
Fixes: f7e26ffa590 ("ACPI ERST: support for ACPI ERST feature")
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
---
 hw/acpi/erst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c
index df856b2669..26391f93ca 100644
--- a/hw/acpi/erst.c
+++ b/hw/acpi/erst.c
@@ -716,7 +716,7 @@ static unsigned write_erst_record(ERSTDeviceState *s)
     if (nvram) {
         /* Write the record into the slot */
         memcpy(nvram, exchange, record_length);
-        memset(nvram + record_length, exchange_length - record_length, 0xFF);
+        memset(nvram + record_length, 0xFF, exchange_length - record_length);
         /* If a new record, increment the record_count */
         if (!record_found) {
             uint32_t record_count;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-10-25  0:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 19:15 [PATCH] hw/acpi/erst.c: Fix memset argument order Christian A. Ehrhardt
2022-10-19 19:37 ` Philippe Mathieu-Daudé
2022-10-19 19:45   ` Eric DeVolder
2022-10-20  6:14 ` Markus Armbruster
2022-10-20 19:58   ` Christian A. Ehrhardt
2022-10-21  4:22     ` Markus Armbruster
2022-10-21  6:42       ` Christian A. Ehrhardt
2022-10-21 15:29   ` Eric DeVolder
2022-10-21 19:05 ` Alexander Bulekov
2022-10-22  5:37   ` Alexander Bulekov
2022-10-23 14:37     ` Christian A. Ehrhardt
2022-10-24 13:20       ` Alexander Bulekov
2022-10-24 14:04         ` Michael S. Tsirkin
2022-10-24 15:42           ` [PATCH v2] hw/acpi/erst.c: Fix memory handling issues Christian A. Ehrhardt
2022-10-24 16:24             ` Alexander Bulekov
2022-10-25  0:24               ` Alexander Bulekov
2022-10-24 20:34             ` Eric DeVolder
2022-10-24 20:37             ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).