Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-21
STALE3698d

[iproute PATCH 1/2] iplink: Add missing variable initialization

From: Phil Sutter <phil@nwl.cc>
Date: 2016-06-16 14:20:06
Subsystem: the rest · Maintainer: Linus Torvalds

Without this, we might feed garbage to the kernel when the address is
shorter than expected.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 ip/iplink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index d2e586b6d1332..4cb9bab66b916 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -273,7 +273,7 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp,
 	while (NEXT_ARG_OK()) {
 		NEXT_ARG();
 		if (matches(*argv, "mac") == 0) {
-			struct ifla_vf_mac ivm;
+			struct ifla_vf_mac ivm = { 0 };
 
 			NEXT_ARG();
 			ivm.vf = vf;
-- 
2.8.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help