From a4a9737d6b186b56455110b6638e8029ae6c2240 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 10 Feb 2019 17:55:42 +0200 Subject: [PATCH] tests: Fix wnm-fuzzer by adding dummy configuration Some of the WNM implementation expects configuration to be available (e.g., ieee802_!1_rx_wnm_coloc_intf_req() dereferences wpa_s->conf), so add a dummy configuration to allow the fuzzer tool to be used. Signed-off-by: Jouni Malinen --- tests/wnm-fuzzer/wnm-fuzzer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/wnm-fuzzer/wnm-fuzzer.c b/tests/wnm-fuzzer/wnm-fuzzer.c index 8efa31155..de74b6bf9 100644 --- a/tests/wnm-fuzzer/wnm-fuzzer.c +++ b/tests/wnm-fuzzer/wnm-fuzzer.c @@ -1,6 +1,6 @@ /* * wpa_supplicant - WNM fuzzer - * Copyright (c) 2015, Jouni Malinen + * Copyright (c) 2015-2019, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -16,6 +16,7 @@ #include "../../wpa_supplicant/wpa_supplicant_i.h" #include "../../wpa_supplicant/bss.h" #include "../../wpa_supplicant/wnm_sta.h" +#include "../../wpa_supplicant/config.h" struct arg_ctx { @@ -24,6 +25,7 @@ struct arg_ctx { struct wpa_bss bss; struct wpa_driver_ops driver; struct wpa_sm wpa; + struct wpa_config conf; }; @@ -60,6 +62,7 @@ static int init_wpa(struct arg_ctx *ctx) ctx->wpa_s.current_bss = &ctx->bss; ctx->wpa_s.driver = &ctx->driver; ctx->wpa_s.wpa = &ctx->wpa; + ctx->wpa_s.conf = &ctx->conf; return 0; }