File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,4 +64,5 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION
6464
6565 add_fuzzer (json )
6666 add_fuzzer (msgpack )
67+ add_fuzzer (number )
6768endif ()
Original file line number Diff line number Diff line change 88 $(OUT ) /json_fuzzer.options \
99 $(OUT ) /msgpack_fuzzer \
1010 $(OUT ) /msgpack_fuzzer_seed_corpus.zip \
11- $(OUT ) /msgpack_fuzzer.options
11+ $(OUT ) /msgpack_fuzzer.options \
12+ $(OUT ) /number_fuzzer \
13+ $(OUT ) /number_fuzzer_seed_corpus.zip \
14+ $(OUT ) /number_fuzzer.options
1215
1316$(OUT ) /% _fuzzer : % _fuzzer.cpp $(shell find ../../src -type f)
1417 $(CXX ) $(CXXFLAGS ) $< -o$@ $(LIB_FUZZING_ENGINE )
@@ -18,5 +21,5 @@ $(OUT)/%_fuzzer_seed_corpus.zip: %_seed_corpus/*
1821
1922$(OUT ) /% _fuzzer.options :
2023 @echo " [libfuzzer]" > $@
21- @echo " max_len = 256 " >> $@
24+ @echo " max_len = 4096 " >> $@
2225 @echo " timeout = 10" >> $@
Original file line number Diff line number Diff line change 1+ *
2+ ! .gitignore
Original file line number Diff line number Diff line change 1+ #include < ArduinoJson.h>
2+
3+ extern " C" int LLVMFuzzerTestOneInput (const uint8_t * data, size_t size) {
4+ // Make a copy to ensure the input is null-terminated
5+ std::string str (reinterpret_cast <const char *>(data), size);
6+
7+ ArduinoJson::detail::parseNumber (str.c_str ());
8+
9+ return 0 ;
10+ }
Original file line number Diff line number Diff line change 1+ 0.5
Original file line number Diff line number Diff line change 1+ 1.5
Original file line number Diff line number Diff line change 1+ infinity
Original file line number Diff line number Diff line change 1+ 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Original file line number Diff line number Diff line change 1+ 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
Original file line number Diff line number Diff line change 1+ 999999.999999
You can’t perform that action at this time.
0 commit comments