[PATCH liburing v1 06/10] test/statx: Fix reading from uninitialized buffer

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

 



From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>

Fix this:

  ==3062618== Conditional jump or move depends on uninitialised value(s)
  ==3062618==    at 0x484D65E: bcmp (vg_replace_strmem.c:1129)
  ==3062618==    by 0x109304: test_statx (statx.c:71)
  ==3062618==    by 0x109304: main (statx.c:149)

Link: https://github.com/axboe/liburing/issues/640
Reported-by: Vitaly Chikunov <vt@xxxxxxxxxxxx>
Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>
---
 test/statx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/statx.c b/test/statx.c
index 5fa086e..4ae3452 100644
--- a/test/statx.c
+++ b/test/statx.c
@@ -40,7 +40,7 @@ static int test_statx(struct io_uring *ring, const char *path)
 {
 	struct io_uring_cqe *cqe;
 	struct io_uring_sqe *sqe;
-	struct statx x1, x2;
+	struct statx x1 = { }, x2 = { };
 	int ret;
 
 	sqe = io_uring_get_sqe(ring);
-- 
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