Parcourir la 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 il y a 14 ans
Parent
commit
5b49c9d5ed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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,