diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2018-07-31 16:33:05 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2018-07-31 16:33:05 +0400 |
commit | f4eac2deeb046a68e4a26ed1a08f8df51bbf817b (patch) | |
tree | 4065a6061450bc3c22c96c556bc87fb91aa99809 /strings | |
parent | fd378fc613851a12be346329d32e1666f10610d7 (diff) | |
download | mariadb-git-f4eac2deeb046a68e4a26ed1a08f8df51bbf817b.tar.gz |
MDEV-16054 simple json functions flatline cpu on garbage input.
Incorrect char sentence should be handled properly.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/json_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c index cbf672f5887..f6b4f15732d 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1645,6 +1645,8 @@ int json_escape(CHARSET_INFO *str_cs, return -1; } } + else /* c_len == 0, an illegal symbol. */ + return -1; } return (int)(json - json_start); |