com php-fuzzing-sapi: Add dictionary and corpus for JSON: corpus/json/1.json corpus/json/10.json corpus/json/11.json corpus/json/12.json
corpus/json/13.json corpus/json/14.json corpus/json/15.json corpus/json/16.json corpus/json/17.json corpus/json/18.json corpus/json/19.json
corpus/json/2.json corpus/json/3.json corpus/json/4.json corpus/json/5.json corpus/json/6.json corpus/json/7.json corpus/json/8.json
corpus/json/9.json corpus/json/fail1.jso

From: Date: Mon, 04 Mar 2019 20:10:29 +0000
Subject: com php-fuzzing-sapi: Add dictionary and corpus for JSON: corpus/json/1.json corpus/json/10.json corpus/json/11.json corpus/json/12.json
corpus/json/13.json corpus/json/14.json corpus/json/15.json corpus/json/16.json corpus/json/17.json corpus/json/18.json corpus/json/19.json
corpus/json/2.json corpus/json/3.json corpus/json/4.json corpus/json/5.json corpus/json/6.json corpus/json/7.json corpus/json/8.json
corpus/json/9.json corpus/json/fail1.jso
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105129@lists.php.net to get a copy of this message
Commit: f13b3de7116fdb5b6a9d33f043f558003107f09d Author: Stanislav Malyshev <smalyshev@gmail.com> Mon, 4 Mar 2019 12:10:29 -0800 Parents: 046640debd71e943d55ac1eaa40e4a157e09764d Branches: master Link: http://git.php.net/?p=php-fuzzing-sapi.git;a=commitdiff;h=f13b3de7116fdb5b6a9d33f043f558003107f09d Log: Add dictionary and corpus for JSON Changed paths: A corpus/json/1.json A corpus/json/10.json A corpus/json/11.json A corpus/json/12.json A corpus/json/13.json A corpus/json/14.json A corpus/json/15.json A corpus/json/16.json A corpus/json/17.json A corpus/json/18.json A corpus/json/19.json A corpus/json/2.json A corpus/json/3..json A corpus/json/4.json A corpus/json/5.json A corpus/json/6.json A corpus/json/7.json A corpus/json/8.json A corpus/json/9.json A corpus/json/fail1.json A corpus/json/fail10.json A corpus/json/fail11.json A corpus/json/fail12.json A corpus/json/fail13.json A corpus/json/fail14.json A corpus/json/fail15.json A corpus/json/fail16.json A corpus/json/fail17.json A corpus/json/fail18.json A corpus/json/fail19.json A corpus/json/fail2.json A corpus/json/fail20.json A corpus/json/fail21.json A corpus/json/fail22.json A corpus/json/fail23.json A corpus/json/fail24.json A corpus/json/fail25.json A corpus/json/fail26.json A corpus/json/fail27.json A corpus/json/fail28.json A corpus/json/fail29.json A corpus/json/fail3.json A corpus/json/fail30.json A corpus/json/fail31.json A corpus/json/fail32.json A corpus/json/fail33.json A corpus/json/fail4.json A corpus/json/fail5.json A corpus/json/fail6.json A corpus/json/fail7.json A corpus/json/fail8.json A corpus/json/fail9.json A corpus/json/pass1.json A corpus/json/pass2.json A corpus/json/pass3.json A json.dict

diff --git a/corpus/json/1.json b/corpus/json/1.json new file mode 100644 index 0000000..8161287 --- /dev/null +++ b/corpus/json/1.json @@ -0,0 +1 @@ +{"prop":{"prop":null}} diff --git a/corpus/json/10.json b/corpus/json/10.json new file mode 100644 index 0000000..59483c2 --- /dev/null +++ b/corpus/json/10.json @@ -0,0 +1 @@ +{"a":100.1,"b":"foo"} diff --git a/corpus/json/11.json b/corpus/json/11.json new file mode 100644 index 0000000..e3907a4 --- /dev/null +++ b/corpus/json/11.json @@ -0,0 +1 @@ +[100.1,"bar"] diff --git a/corpus/json/12.json b/corpus/json/12.json new file mode 100644 index 0000000..222a667 --- /dev/null +++ b/corpus/json/12.json @@ -0,0 +1,2 @@ +{"0":0,"\u0000ab":1,"1":"\u0000null-prefixed value"} + diff --git a/corpus/json/13.json b/corpus/json/13.json new file mode 100644 index 0000000..b9c504c --- /dev/null +++ b/corpus/json/13.json @@ -0,0 +1 @@ +{ "test": { "foo": "bar" } } diff --git a/corpus/json/14.json b/corpus/json/14.json new file mode 100644 index 0000000..0014681 --- /dev/null +++ b/corpus/json/14.json @@ -0,0 +1,2 @@ +"aa\udbff\udffdzz" + diff --git a/corpus/json/15.json b/corpus/json/15.json new file mode 100644 index 0000000..92591f8 --- /dev/null +++ b/corpus/json/15.json @@ -0,0 +1 @@ +"latin 1234 -\/ russian мама мыла раму specialchars \u0002 \b \n U+1D11E >𝄞<" diff --git a/corpus/json/16.json b/corpus/json/16.json new file mode 100644 index 0000000..2129292 --- /dev/null +++ b/corpus/json/16.json @@ -0,0 +1 @@ +{"test":"123343e871700"} diff --git a/corpus/json/17.json b/corpus/json/17.json new file mode 100644 index 0000000..4e4676b --- /dev/null +++ b/corpus/json/17.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] diff --git a/corpus/json/18.json b/corpus/json/18.json new file mode 100644 index 0000000..81873af --- /dev/null +++ b/corpus/json/18.json @@ -0,0 +1 @@ +{"myInt":99,"myFloat":123.45,"myNull":null,"myBool":true,"myString":"Hello World"} diff --git a/corpus/json/19.json b/corpus/json/19.json new file mode 100644 index 0000000..cc33c95 --- /dev/null +++ b/corpus/json/19.json @@ -0,0 +1 @@ +"\u65e5\u672c\u8a9e\u30c6\u30ad\u30b9\u30c8\u3067\u3059\u300201234\uff15\uff16\uff17\uff18\uff19\u3002" diff --git a/corpus/json/2.json b/corpus/json/2.json new file mode 100644 index 0000000..3a9a972 --- /dev/null +++ b/corpus/json/2.json @@ -0,0 +1 @@ +{"largenum":123456789012345678901234567890} diff --git a/corpus/json/3.json b/corpus/json/3.json new file mode 100644 index 0000000..b004f20 --- /dev/null +++ b/corpus/json/3.json @@ -0,0 +1 @@ +["<foo>","'bar'","\"baz\"","&blong&"] diff --git a/corpus/json/4.json b/corpus/json/4.json new file mode 100644 index 0000000..8e73a26 --- /dev/null +++ b/corpus/json/4.json @@ -0,0 +1 @@ +["\u003Cfoo\u003E","\u0027bar\u0027","\u0022baz\u0022","\u0026blong\u0026"] diff --git a/corpus/json/5.json b/corpus/json/5.json new file mode 100644 index 0000000..5c79124 --- /dev/null +++ b/corpus/json/5.json @@ -0,0 +1,5 @@ +[ +{"":"value"}, +{"":"value", "key":"value"}, +{"key":"value", "":"value"} +] diff --git a/corpus/json/6.json b/corpus/json/6.json new file mode 100644 index 0000000..2d85284 --- /dev/null +++ b/corpus/json/6.json @@ -0,0 +1 @@ +[123,13452345,123.13452345] diff --git a/corpus/json/7.json b/corpus/json/7.json new file mode 100644 index 0000000..6e74deb --- /dev/null +++ b/corpus/json/7.json @@ -0,0 +1,2 @@ +["\ud834\udd00"] + diff --git a/corpus/json/8.json b/corpus/json/8.json new file mode 100644 index 0000000..7ea60c3 --- /dev/null +++ b/corpus/json/8.json @@ -0,0 +1 @@ +{"zero": 0e0} diff --git a/corpus/json/9.json b/corpus/json/9.json new file mode 100644 index 0000000..49e7327 --- /dev/null +++ b/corpus/json/9.json @@ -0,0 +1 @@ +[null,null,"abc"] diff --git a/corpus/json/fail1.json b/corpus/json/fail1.json new file mode 100644 index 0000000..6216b86 --- /dev/null +++ b/corpus/json/fail1.json @@ -0,0 +1 @@ +"A JSON payload should be an object or array, not a string." \ No newline at end of file diff --git a/corpus/json/fail10.json b/corpus/json/fail10.json new file mode 100644 index 0000000..5d8c004 --- /dev/null +++ b/corpus/json/fail10.json @@ -0,0 +1 @@ +{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file diff --git a/corpus/json/fail11.json b/corpus/json/fail11.json new file mode 100644 index 0000000..76eb95b --- /dev/null +++ b/corpus/json/fail11.json @@ -0,0 +1 @@ +{"Illegal expression": 1 + 2} \ No newline at end of file diff --git a/corpus/json/fail12.json b/corpus/json/fail12.json new file mode 100644 index 0000000..77580a4 --- /dev/null +++ b/corpus/json/fail12.json @@ -0,0 +1 @@ +{"Illegal invocation": alert()} \ No newline at end of file diff --git a/corpus/json/fail13.json b/corpus/json/fail13.json new file mode 100644 index 0000000..379406b --- /dev/null +++ b/corpus/json/fail13.json @@ -0,0 +1 @@ +{"Numbers cannot have leading zeroes": 013} \ No newline at end of file diff --git a/corpus/json/fail14.json b/corpus/json/fail14.json new file mode 100644 index 0000000..0ed366b --- /dev/null +++ b/corpus/json/fail14.json @@ -0,0 +1 @@ +{"Numbers cannot be hex": 0x14} \ No newline at end of file diff --git a/corpus/json/fail15.json b/corpus/json/fail15.json new file mode 100644 index 0000000..fc8376b --- /dev/null +++ b/corpus/json/fail15.json @@ -0,0 +1 @@ +["Illegal backslash escape: \x15"] \ No newline at end of file diff --git a/corpus/json/fail16.json b/corpus/json/fail16.json new file mode 100644 index 0000000..3fe21d4 --- /dev/null +++ b/corpus/json/fail16.json @@ -0,0 +1 @@ +[\naked] \ No newline at end of file diff --git a/corpus/json/fail17.json b/corpus/json/fail17.json new file mode 100644 index 0000000..62b9214 --- /dev/null +++ b/corpus/json/fail17.json @@ -0,0 +1 @@ +["Illegal backslash escape: \017"] \ No newline at end of file diff --git a/corpus/json/fail18.json b/corpus/json/fail18.json new file mode 100644 index 0000000..edac927 --- /dev/null +++ b/corpus/json/fail18.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/corpus/json/fail19.json b/corpus/json/fail19.json new file mode 100644 index 0000000..3b9c46f --- /dev/null +++ b/corpus/json/fail19.json @@ -0,0 +1 @@ +{"Missing colon" null} \ No newline at end of file diff --git a/corpus/json/fail2.json b/corpus/json/fail2.json new file mode 100644 index 0000000..6b7c11e --- /dev/null +++ b/corpus/json/fail2.json @@ -0,0 +1 @@ +["Unclosed array" \ No newline at end of file diff --git a/corpus/json/fail20.json b/corpus/json/fail20.json new file mode 100644 index 0000000..27c1af3 --- /dev/null +++ b/corpus/json/fail20.json @@ -0,0 +1 @@ +{"Double colon":: null} \ No newline at end of file diff --git a/corpus/json/fail21.json b/corpus/json/fail21.json new file mode 100644 index 0000000..6247457 --- /dev/null +++ b/corpus/json/fail21.json @@ -0,0 +1 @@ +{"Comma instead of colon", null} \ No newline at end of file diff --git a/corpus/json/fail22.json b/corpus/json/fail22.json new file mode 100644 index 0000000..a775258 --- /dev/null +++ b/corpus/json/fail22.json @@ -0,0 +1 @@ +["Colon instead of comma": false] \ No newline at end of file diff --git a/corpus/json/fail23.json b/corpus/json/fail23.json new file mode 100644 index 0000000..494add1 --- /dev/null +++ b/corpus/json/fail23.json @@ -0,0 +1 @@ +["Bad value", truth] \ No newline at end of file diff --git a/corpus/json/fail24.json b/corpus/json/fail24.json new file mode 100644 index 0000000..caff239 --- /dev/null +++ b/corpus/json/fail24.json @@ -0,0 +1 @@ +['single quote'] \ No newline at end of file diff --git a/corpus/json/fail25.json b/corpus/json/fail25.json new file mode 100644 index 0000000..8b7ad23 --- /dev/null +++ b/corpus/json/fail25.json @@ -0,0 +1 @@ +[" tab character in string "] \ No newline at end of file diff --git a/corpus/json/fail26.json b/corpus/json/fail26.json new file mode 100644 index 0000000..845d26a --- /dev/null +++ b/corpus/json/fail26.json @@ -0,0 +1 @@ +["tab\ character\ in\ string\ "] \ No newline at end of file diff --git a/corpus/json/fail27.json b/corpus/json/fail27.json new file mode 100644 index 0000000..6b01a2c --- /dev/null +++ b/corpus/json/fail27.json @@ -0,0 +1,2 @@ +["line +break"] \ No newline at end of file diff --git a/corpus/json/fail28.json b/corpus/json/fail28.json new file mode 100644 index 0000000..621a010 --- /dev/null +++ b/corpus/json/fail28.json @@ -0,0 +1,2 @@ +["line\ +break"] \ No newline at end of file diff --git a/corpus/json/fail29.json b/corpus/json/fail29.json new file mode 100644 index 0000000..47ec421 --- /dev/null +++ b/corpus/json/fail29.json @@ -0,0 +1 @@ +[0e] \ No newline at end of file diff --git a/corpus/json/fail3.json b/corpus/json/fail3.json new file mode 100644 index 0000000..168c81e --- /dev/null +++ b/corpus/json/fail3.json @@ -0,0 +1 @@ +{unquoted_key: "keys must be quoted"} \ No newline at end of file diff --git a/corpus/json/fail30.json b/corpus/json/fail30.json new file mode 100644 index 0000000..8ab0bc4 --- /dev/null +++ b/corpus/json/fail30.json @@ -0,0 +1 @@ +[0e+] \ No newline at end of file diff --git a/corpus/json/fail31.json b/corpus/json/fail31.json new file mode 100644 index 0000000..1cce602 --- /dev/null +++ b/corpus/json/fail31.json @@ -0,0 +1 @@ +[0e+-1] \ No newline at end of file diff --git a/corpus/json/fail32.json b/corpus/json/fail32.json new file mode 100644 index 0000000..45cba73 --- /dev/null +++ b/corpus/json/fail32.json @@ -0,0 +1 @@ +{"Comma instead if closing brace": true, \ No newline at end of file diff --git a/corpus/json/fail33.json b/corpus/json/fail33.json new file mode 100644 index 0000000..ca5eb19 --- /dev/null +++ b/corpus/json/fail33.json @@ -0,0 +1 @@ +["mismatch"} \ No newline at end of file diff --git a/corpus/json/fail4.json b/corpus/json/fail4.json new file mode 100644 index 0000000..9de168b --- /dev/null +++ b/corpus/json/fail4.json @@ -0,0 +1 @@ +["extra comma",] \ No newline at end of file diff --git a/corpus/json/fail5.json b/corpus/json/fail5.json new file mode 100644 index 0000000..ddf3ce3 --- /dev/null +++ b/corpus/json/fail5.json @@ -0,0 +1 @@ +["double extra comma",,] \ No newline at end of file diff --git a/corpus/json/fail6.json b/corpus/json/fail6.json new file mode 100644 index 0000000..ed91580 --- /dev/null +++ b/corpus/json/fail6.json @@ -0,0 +1 @@ +[ , "<-- missing value"] \ No newline at end of file diff --git a/corpus/json/fail7.json b/corpus/json/fail7.json new file mode 100644 index 0000000..8a96af3 --- /dev/null +++ b/corpus/json/fail7.json @@ -0,0 +1 @@ +["Comma after the close"], \ No newline at end of file diff --git a/corpus/json/fail8.json b/corpus/json/fail8.json new file mode 100644 index 0000000..b28479c --- /dev/null +++ b/corpus/json/fail8.json @@ -0,0 +1 @@ +["Extra close"]] \ No newline at end of file diff --git a/corpus/json/fail9.json b/corpus/json/fail9.json new file mode 100644 index 0000000..5815574 --- /dev/null +++ b/corpus/json/fail9.json @@ -0,0 +1 @@ +{"Extra comma": true,} \ No newline at end of file diff --git a/corpus/json/pass1.json b/corpus/json/pass1.json new file mode 100644 index 0000000..70e2685 --- /dev/null +++ b/corpus/json/pass1.json @@ -0,0 +1,58 @@ +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\"", + "backslash": "\\", + "controls": "\b\f\n\r\t", + "slash": "/ & \/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", + "quotes": "&#34; \u0022 %22 0x22 034 &#x22;", + "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] \ No newline at end of file diff --git a/corpus/json/pass2.json b/corpus/json/pass2.json new file mode 100644 index 0000000..d3c63c7 --- /dev/null +++ b/corpus/json/pass2.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/corpus/json/pass3.json b/corpus/json/pass3.json new file mode 100644 index 0000000..4528d51 --- /dev/null +++ b/corpus/json/pass3.json @@ -0,0 +1,6 @@ +{ + "JSON Test Pattern pass3": { + "The outermost value": "must be an object or array.", + "In this test": "It is an object." + } +} diff --git a/json.dict b/json.dict new file mode 100644 index 0000000..e08245a --- /dev/null +++ b/json.dict @@ -0,0 +1,52 @@ +# +# AFL dictionary for JSON +# ----------------------- +# +# Just the very basics. +# +# Inspired by a dictionary by Jakub Wilk <jwilk@jwilk.net> +# + +"0" +",0" +":0" +"0:" +"-1.2e+3" + +"true" +"false" +"null" + +"\"\"" +",\"\"" +":\"\"" +"\"\":" + +"{}" +",{}" +":{}" +"{\"\":0}" +"{{}}" + +"[]" +",[]" +":[]" +"[0]" +"[[]]" + +"''" +"\\" +"\\b" +"\\f" +"\\n" +"\\r" +"\\t" +"\\u0000" +"\\x00" +"\\0" +"\\uD800\\uDC00" +"\\uDBFF\\uDFFF" + +"\"\":0" +"//" +"/**/"
« previous php.cvs (#105129) next »