From f0fb19df9d31a550960fac12a6cc96432b885bba Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 4 Feb 2024 16:00:36 -0500 Subject: Add json fuzzer with seed files from #1123 and test suite ...as well as some cases generated in CI from earlier attempts at fixing this. --- .../393aefa985090be2e48f69f7a0305ecbce89ad26 | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 fuzz/json_fuzzer_seed_corpus/393aefa985090be2e48f69f7a0305ecbce89ad26 (limited to 'fuzz/json_fuzzer_seed_corpus/393aefa985090be2e48f69f7a0305ecbce89ad26') diff --git a/fuzz/json_fuzzer_seed_corpus/393aefa985090be2e48f69f7a0305ecbce89ad26 b/fuzz/json_fuzzer_seed_corpus/393aefa985090be2e48f69f7a0305ecbce89ad26 new file mode 100644 index 00000000..cef9c554 --- /dev/null +++ b/fuzz/json_fuzzer_seed_corpus/393aefa985090be2e48f69f7a0305ecbce89ad26 @@ -0,0 +1,62 @@ +{ + "qpdf": [ + { + "jsonversion": 2, + "pdfversion": "1.3", + "maxobjectid": 6 + }, + { + "obj:1 0 R": { + "value": { + "/Pages": "2 0 R", + "/Type": "/Catalog" + } + }, + "obj:2 0 R": { + "value": { + "/Count": 1, + "/Kids": [ + "3 0 R" + ], + "/Type": "/Pages" + }, + "stream": { + "data": "QlQKICAvRjEgMjQgVGYKICA3MiA3MjAgVGQKICAoUG90YXRvKSBUagpFVAo=", + "dict": {} + } + }, + "obj:3 0 R": { + "potato": { + "salad": "ignored-so-no-string-error", + "nested": [1, 2, {"x": "y"}] + } + }, + "obj:4 0 R": { + "stream": { + "potato": "u:salad" + } + }, + "obj:5 0 R": { + "stream": { + "dic„": {"/A": "/B"}, + "data": "QlQKICAvRjEgMjQgVGYKICA3MiA3MjAgVGQKICAoUG90YXRvKSBUagpFVAo=", + "datafile": "abc" + } + }, + "obj:6 0 R": { + "value": { + "/BaseFont": "/Helvetica", + "/Encoding": "/WinAnsiEncoding", + "/Subtype": "/Type0", + "/Type": "/Font" + } + }, + "trailer": { + "potato": { + "/Root": "1 0 R", + "/Size": 7 + } + } + } + ] +} -- cgit v1.2.3-54-g00ecf