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

Signed-off-by: Phil Sutter <p...@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

Reply via email to