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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>

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@xxxxxxxxxxxx>
Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>
---
 test/fixed-reuse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 */
-- 
Ammar Faizi




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux