diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2019-09-30 15:27:48 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2019-09-30 15:27:48 +0400 |
commit | 6c2724fc05d12904f8c2f58f8dbadd9523d18c96 (patch) | |
tree | 9f8139a8e0a513e3fd15da02d326fd31ddc9a8d4 /strings | |
parent | 6ac2a355531832db250b37e7145a3eac2293b51b (diff) | |
download | mariadb-git-6c2724fc05d12904f8c2f58f8dbadd9523d18c96.tar.gz |
MDEV-19628 JSON with starting double quotes key is not valid.
Make the skip_key a bit faster.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/json_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c index e09082470e8..d24fab4ddeb 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -826,7 +826,10 @@ static int skip_key(json_engine_t *j) { int t_next, c_len; - j->s.c_str-= j->sav_c_len; + if (json_instr_chr_map[j->s.c_next] == S_BKSL && + json_handle_esc(&j->s)) + return 1; + while (json_read_keyname_chr(j) == 0) {} if (j->s.error) |