From 724c0f17b8f64edcccee960049094e33037014e0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 25 May 2019 01:14:46 +0300 Subject: [PATCH] tests: Fix p2p-fuzzer callbacks 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 --- tests/p2p-fuzzer/p2p-fuzzer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/p2p-fuzzer/p2p-fuzzer.c b/tests/p2p-fuzzer/p2p-fuzzer.c index dcc1d72f3..8e9559294 100644 --- a/tests/p2p-fuzzer/p2p-fuzzer.c +++ b/tests/p2p-fuzzer/p2p-fuzzer.c @@ -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) { }