mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-08-13 21:54:13 +00:00
ipmaddr: Avoid accessing uninitialized data
Looks like this can only happen if /proc/net/igmp is malformed, but better be sure. Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
258b7c0fa7
commit
b48a1161f5
@ -136,7 +136,7 @@ static void read_igmp(struct ma_info **result_p)
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp)) {
|
||||
struct ma_info *ma;
|
||||
size_t len;
|
||||
size_t len = 0;
|
||||
|
||||
if (buf[0] != '\t') {
|
||||
sscanf(buf, "%d%s", &m.index, m.name);
|
||||
|
Loading…
Reference in New Issue
Block a user