diff mbox series

[liburing,v1,04/10] test/fixed-reuse: Fix reading from uninitialized array

Message ID 20220810002735.2260172-5-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series liburing test fixes | expand

Commit Message

Ammar Faizi Aug. 10, 2022, 12:31 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

Fix this:

  ==2253268== Conditional jump or move depends on uninitialised value(s)
  ==2253268==    at 0x109F0E: test (fixed-reuse.c:109)
  ==2253268==    by 0x109A62: main (fixed-reuse.c:147)

Link: https://github.com/axboe/liburing/issues/640
Reported-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 test/fixed-reuse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/fixed-reuse.c b/test/fixed-reuse.c
index 401251a..a248e35 100644
--- a/test/fixed-reuse.c
+++ b/test/fixed-reuse.c
@@ -26,7 +26,7 @@  static int test(struct io_uring *ring)
 {
 	struct io_uring_cqe *cqe;
 	struct io_uring_sqe *sqe;
-	char buf[BSIZE];
+	char buf[BSIZE] = { };
 	int ret, i;
 
 	/* open FNAME1 in slot 0 */