mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 03:29:46 +02:00
Fix fuzzer off by one error (#1047)
* Fix fuzzer off by one error Currently the fuzzer has an off by one error, as it passing a bad length to the CharReader::parse method, resulting in a heap buffer overflow. * Rebase master, rerun clang format
This commit is contained in:
@@ -210,7 +210,9 @@ LogicError::LogicError(String const& msg) : Exception(msg) {}
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) {
|
||||
throw RuntimeError(msg);
|
||||
}
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) { throw LogicError(msg); }
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) {
|
||||
throw LogicError(msg);
|
||||
}
|
||||
#else // !JSON_USE_EXCEPTION
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) { abort(); }
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) { abort(); }
|
||||
|
Reference in New Issue
Block a user