Merge commit 'c992cb4e42cc223f67ede0e48d7ff3f4947af0c6' as 'test/compatibility/C/uWebSockets'
This commit is contained in:
20
test/compatibility/C/uWebSockets/fuzzing/Handshake.cpp
Normal file
20
test/compatibility/C/uWebSockets/fuzzing/Handshake.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/* This is a fuzz test of the websocket handshake generator */
|
||||
|
||||
#define WIN32_EXPORT
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
/* We test the websocket handshake generator */
|
||||
#include "../src/WebSocketHandshake.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
char output[28];
|
||||
if (size >= 24) {
|
||||
uWS::WebSocketHandshake::generate((char *) data, output);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user