From ac6543305e4664259d6e587518a65c08a18ecb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 23 Apr 2013 18:43:23 +0200 Subject: [PATCH] config: fix a crash in nm_config_device_get_hwaddr() get_hw_address (nm_device_get_hw_address()) asserts and then SIGSEGV happens in nm_utils_hwaddr_ntoa(). Found by pavlix in NM live VM. --- src/config/nm-config-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/nm-config-device.c b/src/config/nm-config-device.c index b68723e3b2..62c1efedd0 100644 --- a/src/config/nm-config-device.c +++ b/src/config/nm-config-device.c @@ -73,7 +73,7 @@ char * nm_config_device_get_hwaddr (NMConfigDevice *self) { const guint8 *bytes; - guint len; + guint len = 0; bytes = NM_CONFIG_DEVICE_GET_INTERFACE (self)->get_hw_address (self, &len); return nm_utils_hwaddr_ntoa (bytes, nm_utils_hwaddr_type (len));