/src/node/test/fuzzers/fuzz_ClientHelloParser.cc
Line | Count | Source |
1 | | /* |
2 | | * A fuzzer focused on node::crypto::ClientHelloParser. |
3 | | */ |
4 | | |
5 | | #include <stdlib.h> |
6 | | #include "crypto/crypto_clienthello-inl.h" |
7 | | |
8 | 36.0k | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
9 | 36.0k | node::crypto::ClientHelloParser parser; |
10 | 36.0k | bool end_cb_called = false; |
11 | 36.0k | parser.Start([](void* arg, auto hello) { }, |
12 | 36.0k | [](void* arg) { }, |
13 | 36.0k | &end_cb_called); |
14 | 36.0k | parser.Parse(data, size); |
15 | 36.0k | return 0; |
16 | 36.0k | } |