Skip to content

Commit

Permalink
MDEV-19628 JSON with starting double quotes key is not valid.
Browse files Browse the repository at this point in the history
Make the skip_key a bit faster.
  • Loading branch information
Alexey Botchkov committed Sep 30, 2019
1 parent 6ac2a35 commit 6c2724f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion strings/json_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c2724f

Please sign in to comment.