From 024f7e10b27319f41e97a046d2c468892479bba8 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 25 Sep 2013 13:41:21 -0500 Subject: [PATCH] trivial: fix uninitialized bytes in ethtool driver name lookup If the interface doesn't have an ethtool driver name, then '.driver' will never be touched and (*drvinfo.driver) will access uninitialized bytes. --- src/platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 5b5cbc04c6..dd8bf63263 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -536,7 +536,7 @@ link_is_software (struct rtnl_link *link) static const char * ethtool_get_driver (const char *ifname) { - struct ethtool_drvinfo drvinfo; + struct ethtool_drvinfo drvinfo = { 0 }; drvinfo.cmd = ETHTOOL_GDRVINFO; if (!ethtool_get (ifname, &drvinfo))