mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
Fix JSON parser error found by fuzz
This commit is contained in:
parent
f0fb19df9d
commit
7ae095fa09
@ -0,0 +1 @@
|
|||||||
|
"\,,,,,p,,-\,,,,
|
@ -16,7 +16,7 @@ my @fuzzers = (
|
|||||||
['dct' => 1],
|
['dct' => 1],
|
||||||
['flate' => 1],
|
['flate' => 1],
|
||||||
['hex' => 1],
|
['hex' => 1],
|
||||||
['json' => 37],
|
['json' => 38],
|
||||||
['lzw' => 2],
|
['lzw' => 2],
|
||||||
['pngpredictor' => 1],
|
['pngpredictor' => 1],
|
||||||
['runlength' => 6],
|
['runlength' => 6],
|
||||||
|
@ -1246,7 +1246,8 @@ JSONParser::handleToken()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw std::logic_error("JSONParser::handleToken : non-terminal lexer state encountered");
|
throw std::runtime_error(
|
||||||
|
"JSON: offset " + std::to_string(offset) + ": premature end of input");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user