summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-12 12:16:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-12 12:16:40 +0300
commit60c04be6599597548ad07ce11e1d7d4004a7cc9c (patch)
tree491f1b7b65b82ed270e5af34db4d4cebf760e501 /strings
parentebddd8699c02519f99a313182b96ae1c04a67a63 (diff)
parent9554ef067878c4650ef4b9ad44e0b222cdb313a5 (diff)
downloadmariadb-git-60c04be6599597548ad07ce11e1d7d4004a7cc9c.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'strings')
-rw-r--r--strings/json_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 3763ac4ed54..9ab411345c8 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -320,15 +320,17 @@ static int json_handle_esc(json_string_t *s)
if (s->c_next != '\\')
return s->error= JE_SYN;
+ s->c_str+= c_len;
if ((c_len= json_next_char(s)) <= 0)
return s->error= json_eos(s) ? JE_EOS : JE_BAD_CHR;
if (s->c_next != 'u')
return s->error= JE_SYN;
+ s->c_str+= c_len;
if (read_4_hexdigits(s, code+2))
return 1;
- if ((c_len= my_utf16_uni(0, &s->c_next, code, code+4)) == 2)
+ if ((c_len= my_utf16_uni(0, &s->c_next, code, code+4)) == 4)
return 0;
}
return s->error= JE_BAD_CHR;