2020-03-03 06:23:19 +08:00
|
|
|
#include "simdjson.h"
|
2019-12-28 02:42:44 +08:00
|
|
|
#include <cstddef>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "NullBuffer.h"
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
2020-04-17 09:49:10 +08:00
|
|
|
simdjson::dom::parser parser;
|
|
|
|
simdjson::dom::element elem;
|
2020-06-21 03:04:23 +08:00
|
|
|
auto error = parser.parse(Data, Size).get(elem);
|
2020-04-17 09:49:10 +08:00
|
|
|
if (!error) {
|
|
|
|
NulOStream os;
|
|
|
|
os<<elem;
|
|
|
|
}
|
|
|
|
return 0;
|
2019-12-28 02:42:44 +08:00
|
|
|
}
|