mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-16054 simple json functions flatline cpu on garbage input.
Incorrect char sentence should be handled properly.
This commit is contained in:
@@ -1645,6 +1645,8 @@ int json_escape(CHARSET_INFO *str_cs,
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else /* c_len == 0, an illegal symbol. */
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (int)(json - json_start);
|
||||
|
Reference in New Issue
Block a user