mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-23187: Assorted assertion failures in json_find_path with certain
collations Fix by Alexey Botchkov The 'value_len' is calculated wrong for the multibyte charsets. In the read_strn() function we get the length of the string with the final ' " ' character. So have to subtract it's length from the value_len. And the length of '1' isn't correct for the ucs2 charset (must be 2).
This commit is contained in:
@ -401,7 +401,7 @@ static int read_strn(json_engine_t *j)
|
||||
return 1;
|
||||
|
||||
j->state= j->stack[j->stack_p];
|
||||
j->value_len= (int)(j->s.c_str - j->value) - 1;
|
||||
j->value_len= (int)(j->s.c_str - j->value) - j->s.c_next_len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user