Squashed 'test/compatibility/C/uWebSockets/' content from commit 03681cc
git-subtree-dir: test/compatibility/C/uWebSockets git-subtree-split: 03681ccbe630eb4db6322557e6bfe8cda8f41526
This commit is contained in:
20
fuzzing/Handshake.cpp
Normal file
20
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