commit | 45e3a9aee34818ccae03d14d38ce44eaaeb2c19c | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Mon Feb 14 08:49:51 2022 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Mon Feb 14 08:49:51 2022 +0100 |
tree | 01ba6a33db07668ca461823bcc7c23ed4da75c95 | |
parent | a9f7909c458d5e5a7cbdec38d4ea2279daa75d01 [diff] [blame] |
parser json BUGFIX handle invalid JSON in nested ext parsing
diff --git a/src/parser_json.c b/src/parser_json.c index 49fd941..c9fc573 100644 --- a/src/parser_json.c +++ b/src/parser_json.c
@@ -214,6 +214,10 @@ if ((in_start.current[0] == '\"') && (in_start.current[-1] != '\\')) { ++quot_count; } + if (in_start.current == in_start.start) { + /* invalid JSON */ + return LY_ENOT; + } } while (quot_count < 2); /* check if there are any nested extension instances */