diff options
author | Florin Malita <fmalita@chromium.org> | 2018-06-15 09:21:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-15 13:56:44 +0000 |
commit | 587f5a9a309feebee7bf069f762f5702baf4699e (patch) | |
tree | a3e627acaa2e8743d8cb5f2a3a10d5805e259e5d /modules/skjson/src/SkJSONTest.cpp | |
parent | c891b102867d5af953c6a0ea68f15292bccd5035 (diff) |
[skjson] Catch end-of-stream for unbalanced scopes
The input is not guaranteed to contain well-formed scopes, so it's not
sufficient to check for end-of-stream only when popping the top-level
scope -- we have to check on every scope pop.
Bug: oss-fuzz:8898
Change-Id: I7399a8872187ec6714672cac2ff8fc7fbf3c2dfe
Reviewed-on: https://skia-review.googlesource.com/135059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'modules/skjson/src/SkJSONTest.cpp')
-rw-r--r-- | modules/skjson/src/SkJSONTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/skjson/src/SkJSONTest.cpp b/modules/skjson/src/SkJSONTest.cpp index 91ae497cf0..1aaa278fb8 100644 --- a/modules/skjson/src/SkJSONTest.cpp +++ b/modules/skjson/src/SkJSONTest.cpp @@ -49,6 +49,7 @@ DEF_TEST(SkJSON_Parse, reporter) { { "[ \"foo" , nullptr }, { "[ \"fo\0o\" ]" , nullptr }, + { "{\"\":{}" , nullptr }, { "{ null }" , nullptr }, { "{ \"k\" : }" , nullptr }, { "{ : null }" , nullptr }, |