From 25f083f58304712d2aff13a85daa4c3ec52e0ba7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 30 Jun 2022 18:47:25 +0200 Subject: [PATCH 1/2] testsuite: repair read of uninitialized memory Function ``test_backoff_time`` does not initialize ``delta``, and ``get_backoff_delta_msec`` then performs a read from uninitialized memory with the ``!*delta`` expression. Signed-off-by: Jan Engelhardt Signed-off-by: Lucas De Marchi --- testsuite/test-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/test-util.c b/testsuite/test-util.c index fb8c9ef..5766584 100644 --- a/testsuite/test-util.c +++ b/testsuite/test-util.c @@ -231,7 +231,7 @@ DEFINE_TEST(test_addu64_overflow, static int test_backoff_time(const struct test *t) { - unsigned long long delta; + unsigned long long delta = 0; /* Check exponential increments */ get_backoff_delta_msec(now_msec(), now_msec() + 10, &delta); -- 2.25.4