Blame SOURCES/0093-ipmaddr-Avoid-accessing-uninitialized-data.patch
|
|
36cfb7 |
From e5d32611010d4694562980b790ed7849342f594b Mon Sep 17 00:00:00 2001
|
|
|
36cfb7 |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
36cfb7 |
Date: Mon, 29 Apr 2019 20:08:07 +0200
|
|
|
36cfb7 |
Subject: [PATCH] ipmaddr: Avoid accessing uninitialized data
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
|
|
|
36cfb7 |
Upstream Status: iproute2.git commit b48a1161f5f9b
|
|
|
36cfb7 |
|
|
|
36cfb7 |
commit b48a1161f5f9b6a0cda399a224bbbf72eba4a5c6
|
|
|
36cfb7 |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
36cfb7 |
Date: Mon Aug 21 11:27:01 2017 +0200
|
|
|
36cfb7 |
|
|
|
36cfb7 |
ipmaddr: Avoid accessing uninitialized data
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Looks like this can only happen if /proc/net/igmp is malformed, but
|
|
|
36cfb7 |
better be sure.
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
36cfb7 |
---
|
|
|
36cfb7 |
ip/ipmaddr.c | 2 +-
|
|
|
36cfb7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
36cfb7 |
|
|
|
36cfb7 |
diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
|
|
|
36cfb7 |
index 4f726fdd976f1..85a69e779563d 100644
|
|
|
36cfb7 |
--- a/ip/ipmaddr.c
|
|
|
36cfb7 |
+++ b/ip/ipmaddr.c
|
|
|
36cfb7 |
@@ -136,7 +136,7 @@ static void read_igmp(struct ma_info **result_p)
|
|
|
36cfb7 |
|
|
|
36cfb7 |
while (fgets(buf, sizeof(buf), fp)) {
|
|
|
36cfb7 |
struct ma_info *ma;
|
|
|
36cfb7 |
- size_t len;
|
|
|
36cfb7 |
+ size_t len = 0;
|
|
|
36cfb7 |
|
|
|
36cfb7 |
if (buf[0] != '\t') {
|
|
|
36cfb7 |
sscanf(buf, "%d%s", &m.index, m.name);
|
|
|
36cfb7 |
--
|
|
|
e138d9 |
2.21.0
|
|
|
36cfb7 |
|