mirror of
https://github.com/MariaDB/server.git
synced 2025-07-25 15:08:40 +00:00
MDEV-11857 json_search() shows "Out of memory" with empty key.
We should be ready for an empty key.
This commit is contained in:
@ -1701,8 +1701,10 @@ int json_get_path_next(json_engine_t *je, json_path_t *p)
|
||||
{
|
||||
case JST_KEY:
|
||||
p->last_step->key= je->s.c_str;
|
||||
while (json_read_keyname_chr(je) == 0)
|
||||
do
|
||||
{
|
||||
p->last_step->key_end= je->s.c_str;
|
||||
} while (json_read_keyname_chr(je) == 0);
|
||||
if (je->s.error)
|
||||
return 1;
|
||||
/* Now we have je.state == JST_VALUE, so let's handle it. */
|
||||
|
Reference in New Issue
Block a user