qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] util/keyval: fix msan findings
@ 2025-02-28 21:20 Patrick Venture
  2025-03-01  6:12 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Venture @ 2025-02-28 21:20 UTC (permalink / raw)
  To: peter.maydell, armbru; +Cc: qemu-devel, Peter Foley, Patrick Venture

From: Peter Foley <pefoley@google.com>

e.g.
qemu: Uninitialized value was created by an allocation of 'key_in_cur.i' in the stack frame
qemu: #0 0xaaaac49f489c in keyval_parse_one third_party/qemu/util/keyval.c:190:5

Signed-off-by: Peter Foley <pefoley@google.com>
Signed-off-by: Patrick Venture <venture@google.com>
---
 util/keyval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/keyval.c b/util/keyval.c
index a70629a481..f33c64079d 100644
--- a/util/keyval.c
+++ b/util/keyval.c
@@ -187,7 +187,7 @@ static const char *keyval_parse_one(QDict *qdict, const char *params,
 {
     const char *key, *key_end, *val_end, *s, *end;
     size_t len;
-    char key_in_cur[128];
+    char key_in_cur[128] = {};
     QDict *cur;
     int ret;
     QObject *next;
-- 
2.48.1.711.g2feabab25a-goog



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

end of thread, other threads:[~2025-03-03 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 21:20 [PATCH] util/keyval: fix msan findings Patrick Venture
2025-03-01  6:12 ` Paolo Bonzini
2025-03-01  7:14   ` Markus Armbruster
2025-03-03 16:32     ` Peter Foley
2025-03-03 18:51       ` Paolo Bonzini

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).