]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix WNM fuzzzer to work with wnm_sta.c changes
authorJouni Malinen <j@w1.fi>
Mon, 30 Dec 2024 16:29:25 +0000 (18:29 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Dec 2024 16:29:25 +0000 (18:29 +0200)
wpa_s->current_ssid needs to be set for processing BSS transition
management operations now witht he wnm_san_process() changes to use
wpa_supplicant_select_bss(), so set that in the WNM fuzzer to avoid
false errors due to dereferencing a NULL pointer.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/fuzzing/wnm/wnm.c

index ea2341006010a4349a0fb7396f92d701df669ba4..561edd62e3e997270318b99f8dc37c4b5f611c45 100644 (file)
@@ -28,6 +28,7 @@ struct arg_ctx {
        struct wpa_driver_ops driver;
        struct wpa_sm wpa;
        struct wpa_config conf;
+       struct wpa_ssid ssid;
 };
 
 
@@ -50,6 +51,7 @@ static int init_wpa(struct arg_ctx *ctx)
        ctx->wpa_s.wpa_state = WPA_COMPLETED;
        os_memcpy(ctx->wpa_s.bssid, "\x02\x00\x00\x00\x03\x00", ETH_ALEN);
        ctx->wpa_s.current_bss = &ctx->bss;
+       ctx->wpa_s.current_ssid = &ctx->ssid;
        ctx->wpa_s.driver = &ctx->driver;
        ctx->wpa_s.wpa = &ctx->wpa;
        ctx->wpa_s.conf = &ctx->conf;