From: Jouni Malinen Date: Fri, 24 May 2019 22:14:46 +0000 (+0300) Subject: tests: Fix p2p-fuzzer callbacks X-Git-Tag: hostap_2_9~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=724c0f17b8f64edcccee960049094e33037014e0;p=thirdparty%2Fhostap.git 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 --- 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) { }