diff options
author | Jay Berkenbilt <ejb@ql.org> | 2024-02-04 23:27:43 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2024-02-04 23:27:49 +0100 |
commit | 7ae095fa091af9a94e0e9bf140280a0519859d98 (patch) | |
tree | abccea9e1ed0f4ffa191ec43c9f47754b370a408 /libqpdf/JSON.cc | |
parent | f0fb19df9d31a550960fac12a6cc96432b885bba (diff) | |
download | qpdf-7ae095fa091af9a94e0e9bf140280a0519859d98.tar.zst |
Fix JSON parser error found by fuzz
Diffstat (limited to 'libqpdf/JSON.cc')
-rw-r--r-- | libqpdf/JSON.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index c9816809..28f451a9 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -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; } |