0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-24 03:07:54 +01:00
nodejs/test/fuzzers/fuzz_ClientHelloParser.cc
AdamKorcz 65573f4864
test: add fuzzer for ClientHelloParser
Signed-off-by: Adam Korczynski <adam@adalogics.com>
PR-URL: https://github.com/nodejs/node/pull/51088
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-05-12 19:28:44 +02:00

17 lines
428 B
C++

/*
* A fuzzer focused on node::crypto::ClientHelloParser.
*/
#include <stdlib.h>
#include "crypto/crypto_clienthello-inl.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
node::crypto::ClientHelloParser parser;
bool end_cb_called = false;
parser.Start([](void* arg, auto hello) { },
[](void* arg) { },
&end_cb_called);
parser.Parse(data, size);
return 0;
}