Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
a49644ab
Unverified
Commit
a49644ab
authored
May 28, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚑
adjusted Fuzzer to new parser
out_of_range exceptions where unexpected before - the parser used to crash in these situations...
parent
db03d093
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
fuzzer-parse_cbor.cpp
test/src/fuzzer-parse_cbor.cpp
+4
-0
fuzzer-parse_json.cpp
test/src/fuzzer-parse_json.cpp
+4
-0
fuzzer-parse_msgpack.cpp
test/src/fuzzer-parse_msgpack.cpp
+4
-0
No files found.
test/src/fuzzer-parse_cbor.cpp
View file @
a49644ab
...
...
@@ -58,6 +58,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
// type errors can occur during parsing, too
}
catch
(
const
json
::
out_of_range
&
)
{
// out of range errors can occur during parsing, too
}
// return 0 - non-zero return values are reserved for future use
return
0
;
...
...
test/src/fuzzer-parse_json.cpp
View file @
a49644ab
...
...
@@ -63,6 +63,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
// parse errors are ok, because input may be random bytes
}
catch
(
const
json
::
out_of_range
&
)
{
// out of range errors may happen if provided sizes are excessive
}
// return 0 - non-zero return values are reserved for future use
return
0
;
...
...
test/src/fuzzer-parse_msgpack.cpp
View file @
a49644ab
...
...
@@ -58,6 +58,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
// type errors can occur during parsing, too
}
catch
(
const
json
::
out_of_range
&
)
{
// out of range errors may happen if provided sizes are excessive
}
// return 0 - non-zero return values are reserved for future use
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment