Made use of libfuzzer
This commit is contained in:
parent
8e82428740
commit
f6df4cde4e
9 changed files with 107 additions and 13 deletions
11
tests/fuzzers/response_message_parse.cpp
Normal file
11
tests/fuzzers/response_message_parse.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "utility.hpp"
|
||||
#include <sstream>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
std::stringstream ss;
|
||||
ss << std::string(reinterpret_cast<const char *>(data), size);
|
||||
std::string version, status_code;
|
||||
SimpleWeb::CaseInsensitiveMultimap header;
|
||||
SimpleWeb::ResponseMessage::parse(ss, version, status_code, header);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue