Skip to content

Commit d3d2e53

Browse files
authored
Websocket: make fuzzer cover ws.c (#136)
* websocket: use mandatory option * websocket: make fuzzer work with corpora example
1 parent 2c82bb3 commit d3d2e53

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
454 Bytes
Binary file not shown.

curl_fuzzer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ int fuzz_set_allowed_protocols(FUZZ_DATA *fuzz)
571571
allowed_protocols = "tftp";
572572
#endif
573573
#ifdef FUZZ_PROTOCOLS_WS
574-
allowed_protocols = "ws,wss";
574+
// http is required by websockets
575+
allowed_protocols = "http,ws,wss";
576+
FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CONNECT_ONLY, 2L));
575577
#endif
576578

577579
FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_PROTOCOLS_STR, allowed_protocols));

0 commit comments

Comments
 (0)