- Add 0001-testsuite-repair-read-of-uninitialized-memory.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=206
This commit is contained in:
Jan Engelhardt 2022-06-30 18:53:58 +00:00 committed by Git OBS Bridge
parent c2e042cd49
commit 5c1d1e2b11
4 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From f019428527c87530fb59caca7f2868ac2c5d5391 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 30 Jun 2022 18:47:25 +0200
Subject: [PATCH] testsuite: repair read of uninitialized memory
References: https://github.com/kmod-project/kmod/pull/15
References: https://github.com/kmod-project/kmod/issues/14
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>
---
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.36.1

View File

@ -42,6 +42,7 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch
Patch9: 0001-testsuite-repair-read-of-uninitialized-memory.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets

View File

@ -6,6 +6,7 @@ Thu Jun 30 16:15:35 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
* modprobe: added the --wait option
- Drop libkmod-Provide-info-even-for-modules-built-into-the.patch
(merged)
- Add 0001-testsuite-repair-read-of-uninitialized-memory.patch
-------------------------------------------------------------------
Mon Mar 28 15:01:46 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -42,6 +42,7 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch
Patch9: 0001-testsuite-repair-read-of-uninitialized-memory.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets