Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP/3 fuzzing harness #97

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use DGRAM for HTTP3
  • Loading branch information
Vasco-jofra authored and elopez committed Jan 5, 2024
commit c43ca0edfc11baafd235bc0c73e48e5d547ab7ac
9 changes: 8 additions & 1 deletion curl_fuzzer_callback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ curl_socket_t fuzz_open_socket(void *ptr,
sman->index,
sman->index);

if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {

#ifdef FUZZ_PROTOCOLS_HTTP3
const int socket_type = SOCK_DGRAM;
#else
const int socket_type = SOCK_STREAM;
#endif

if(socketpair(AF_UNIX, socket_type, 0, fds)) {
/* Failed to create a pair of sockets. */
return CURL_SOCKET_BAD;
}
Expand Down