Fix fuzzing

This commit is contained in:
Alex Hultman
2019-03-09 14:08:15 +01:00
parent 3b3b1d70c6
commit a8184c3844
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -12,13 +12,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
/* Pad the fuzz */
uWS::HttpParser httpParser;
memcpy(padded + 32, data, size);
memcpy(padded, data, size);
/* User data */
void *user = (void *) 13;
/* Parse it */
httpParser.consumePostPadded(padded + 32, size, user, [](void *s, uWS::HttpRequest *httpRequest) -> void * {
httpParser.consumePostPadded(padded, size, user, [](void *s, uWS::HttpRequest *httpRequest) -> void * {
/* todo: Route this via router */