From: Catalin Drula Date: Wed, 16 Mar 2011 10:30:09 +0000 (+0200) Subject: dbus: Fix interface list getter with multiple interfaces X-Git-Tag: hostap-1-bp~486 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b49c9d5edf9006be0c4e19b8ffc7b257a18a054;p=thirdparty%2Fhostap.git dbus: Fix interface list getter with multiple interfaces There's a bug in the getter for the 'Interfaces' property of /fi/w1/wpa_supplicant1 (new D-Bus interface) which causes a 'Segmentation Fault' when there are multiple interfaces. --- diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index 3f129a092..e41fc1621 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -893,7 +893,7 @@ DBusMessage * wpas_dbus_getter_interfaces(DBusMessage *message, } for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) - paths[i] = wpa_s->dbus_new_path; + paths[i++] = wpa_s->dbus_new_path; reply = wpas_dbus_simple_array_property_getter(message, DBUS_TYPE_OBJECT_PATH,