]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: Fix interface list getter with multiple interfaces
authorCatalin Drula <catalin.drula@personalnetworks.ro>
Wed, 16 Mar 2011 10:30:09 +0000 (12:30 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 16 Mar 2011 10:30:09 +0000 (12:30 +0200)
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.

wpa_supplicant/dbus/dbus_new_handlers.c

index 3f129a092fe11843ebfff12bcc83ad183f49f689..e41fc162178e14450ac387d2da711492fbe8b2d2 100644 (file)
@@ -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,