mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +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],
|
||||
['flate' => 1],
|
||||
['hex' => 1],
|
||||
['json' => 37],
|
||||
['json' => 38],
|
||||
['lzw' => 2],
|
||||
['pngpredictor' => 1],
|
||||
['runlength' => 6],
|
||||
|
@ -1246,7 +1246,8 @@ JSONParser::handleToken()
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user