Skip to content

Commit 21ae5ba

Browse files
committed
Better fuzzing corpus
1 parent 16f936b commit 21ae5ba

File tree

10 files changed

+16
-0
lines changed

10 files changed

+16
-0
lines changed

fuzzing/input/fuzz2.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bee.legs != cat.legs

fuzzing/input/fuzz3.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bee.has_tail or cat.has_tail

fuzzing/input/fuzz4.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bee.legs + cat.legs == 12

fuzzing/input/fuzz5.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
min(bee.legs, cat.legs)

fuzzing/input/fuzz6.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat.sound == 'meow'

fuzzing/input/fuzz7.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat.sound[0:2] + bee.sound[2:4]

fuzzing/input/fuzz8.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat.sound if cat.has_tail else bee.sound

fuzzing/input/fuzz9.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bee.colors[0] in cat.colors

fuzzing/runner/src/main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ int main() {
99
jsonexpr::variable_registry vars;
1010
jsonexpr::function_registry funcs = jsonexpr::default_functions();
1111

12+
vars["cat"] = R"({
13+
"legs": 4, "has_tail": true, "sound": "meow", "colors": ["orange", "black"]
14+
})"_json;
15+
16+
vars["bee"] = R"({
17+
"legs": 6, "has_tail": false, "sound": "bzzz", "colors": ["yellow"]
18+
})"_json;
19+
1220
#ifdef __AFL_HAVE_MANUAL_CONTROL
1321
__AFL_INIT();
1422
#endif

0 commit comments

Comments
 (0)