Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37819811
en ru br
Репозитории ALT

Группа :: Система/Ядро и оборудование
Пакет: kmod

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0001-testsuite-repair-read-of-uninitialized-memory.patch
Скачать


From 25f083f58304712d2aff13a85daa4c3ec52e0ba7 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
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 <jengelh@inai.de>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---
 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
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin