Skip to content

Commit 6c2724f

Browse files
author
Alexey Botchkov
committed
MDEV-19628 JSON with starting double quotes key is not valid.
Make the skip_key a bit faster.
1 parent 6ac2a35 commit 6c2724f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

strings/json_lib.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,10 @@ static int skip_key(json_engine_t *j)
826826
{
827827
int t_next, c_len;
828828

829-
j->s.c_str-= j->sav_c_len;
829+
if (json_instr_chr_map[j->s.c_next] == S_BKSL &&
830+
json_handle_esc(&j->s))
831+
return 1;
832+
830833
while (json_read_keyname_chr(j) == 0) {}
831834

832835
if (j->s.error)

0 commit comments

Comments
 (0)