From: Jan Engelhardt Date: Thu, 30 Jun 2022 16:47:25 +0000 (+0200) Subject: testsuite: repair read of uninitialized memory X-Git-Tag: v31~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16c086f48c2270ad6412ad7226df53079f825270;p=thirdparty%2Fkmod.git 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 --- diff --git a/testsuite/test-util.c b/testsuite/test-util.c index fb8c9ef2..5766584e 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);