Browse Source

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.
Catalin Drula 14 years ago
parent
commit
5b49c9d5ed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wpa_supplicant/dbus/dbus_new_handlers.c

+ 1 - 1
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,