From a89193a7d68f59c1ce3bf47a32ff7b73661f1c54 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 16 Jun 2016 16:19:39 +0200 Subject: [PATCH] iplink: Add missing variable initialization Without this, we might feed garbage to the kernel when the address is shorter than expected. Signed-off-by: Phil Sutter --- ip/iplink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iplink.c b/ip/iplink.c index d2e586b6..4cb9bab6 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;