]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix p2p-fuzzer callbacks
authorJouni Malinen <jouni@codeaurora.org>
Fri, 24 May 2019 22:14:46 +0000 (01:14 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 24 May 2019 22:20:01 +0000 (01:20 +0300)
Couple of the callback functions had changed their prototypes and
p2p-fuzzer compilation resulted in a warning and not returning
*scheduled from the send_action() callback. This was reported as
use-of-uninitialized-value which was not really possible with
wpa_supplicant since the issue was only in the fuzzing wrapper.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14924
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/p2p-fuzzer/p2p-fuzzer.c

index dcc1d72f3735260650483fc1fbc767070bbd4e96..8e9559294b152014f6980399c13b652c6200af7e 100644 (file)
@@ -52,8 +52,9 @@ static void dev_lost(void *ctx, const u8 *dev_addr)
 
 static int send_action(void *ctx, unsigned int freq, const u8 *dst,
                       const u8 *src, const u8 *bssid, const u8 *buf,
-                      size_t len, unsigned int wait_time)
+                      size_t len, unsigned int wait_time, int *scheduled)
 {
+       *scheduled = 0;
        return 0;
 }
 
@@ -63,7 +64,8 @@ static void send_action_done(void *ctx)
 }
 
 
-static void go_neg_req_rx(void *ctx, const u8 *src, u16 dev_passwd_id)
+static void go_neg_req_rx(void *ctx, const u8 *src, u16 dev_passwd_id,
+                         u8 go_intent)
 {
 }