🐛 fixing #575

I forgot to consider the offset.
This commit is contained in:
Niels Lohmann committed 2017-05-07 13:41:48 +02:00
1 parent 56ac7908f1
commit fba1bcdd0b
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -1010,4 +1010,10 @@ TEST_CASE("regression tests")
CHECK(not(6 <= j["a"]));
CHECK(not(6 < j["a"]));
}
SECTION("issue #575 - heap-buffer-overflow (OSS-Fuzz 1400)")
{
std::vector<uint8_t> vec = {'"', '\\', '"', 'X', '"', '"'};
CHECK_THROWS_AS(json::parse(vec), json::parse_error);
}
}