]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: Fix IEs getter to use wpa_bss_ie_ptr()
authorBrad Kemp <brad@beechwoods.com>
Fri, 5 Feb 2021 20:46:49 +0000 (15:46 -0500)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2021 09:41:09 +0000 (11:41 +0200)
The wpa_bss structure's last element is an empty array. The forgotten
code here assumed that the array of IEs was contiguous to the wpa_bss
structure. This is not always the case anymore. Update this missed case
to use the new wpa_bss_ie_ptr() wrapper to send the correct array of IEs
over DBus.

Fixes: be7ee264f654 ("BSS: Use wrapper function for getting a pointer to the IE buffer")
Signed-off-by: Brad Kemp <brad at beechwoods.com>
wpa_supplicant/dbus/dbus_new_handlers.c

index 1e326a070b730fd0c780ee2c3a199161ade4a71c..445434cf2adc5f4d71ff74a5dc1152ee199d1ac9 100644 (file)
@@ -5082,8 +5082,8 @@ dbus_bool_t wpas_dbus_getter_bss_ies(
                return FALSE;
 
        return wpas_dbus_simple_array_property_getter(iter, DBUS_TYPE_BYTE,
-                                                     res + 1, res->ie_len,
-                                                     error);
+                                                     wpa_bss_ie_ptr(res),
+                                                     res->ie_len, error);
 }