From: Jouni Malinen Date: Mon, 30 Dec 2024 16:29:25 +0000 (+0200) Subject: tests: Fix WNM fuzzzer to work with wnm_sta.c changes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e43d22419776e77c72eb0131f8c4ede35fc51fe0;p=thirdparty%2Fhostap.git tests: Fix WNM fuzzzer to work with wnm_sta.c changes 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 --- diff --git a/tests/fuzzing/wnm/wnm.c b/tests/fuzzing/wnm/wnm.c index ea2341006..561edd62e 100644 --- a/tests/fuzzing/wnm/wnm.c +++ b/tests/fuzzing/wnm/wnm.c @@ -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;