-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update http-parser to http-parser@ec8b5ee63f
PR-URL: nodejs-private/node-private#236 Reviewed-By: Fedor Indutny <[email protected]>
- Loading branch information
1 parent
2eacfbe
commit 5de5354
Showing
7 changed files
with
220 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include "http_parser.h" | ||
|
||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) | ||
{ | ||
static const http_parser_settings settings_null = { | ||
.on_message_begin = 0 | ||
, .on_header_field = 0 | ||
,.on_header_value = 0 | ||
,.on_url = 0 | ||
,.on_status = 0 | ||
,.on_body = 0 | ||
,.on_headers_complete = 0 | ||
,.on_message_complete = 0 | ||
,.on_chunk_header = 0 | ||
,.on_chunk_complete = 0 | ||
}; | ||
|
||
http_parser parser; | ||
http_parser_init(&parser, HTTP_BOTH); | ||
http_parser_execute(&parser, &settings_null, (char*)data, size); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include "http_parser.h" | ||
|
||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) | ||
{ | ||
struct http_parser_url u; | ||
http_parser_url_init(&u); | ||
http_parser_parse_url((char*)data, size, 0, &u); | ||
http_parser_parse_url((char*)data, size, 1, &u); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.