mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7019 String::chop() is wrong and may potentially crash (MySQL bug#56492)
Merging a fix from the upstream.
This commit is contained in:
@ -232,7 +232,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline void chop()
|
inline void chop()
|
||||||
{
|
{
|
||||||
Ptr[str_length--]= '\0';
|
str_length--;
|
||||||
|
Ptr[str_length]= '\0';
|
||||||
|
DBUG_ASSERT(strlen(Ptr) == str_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void free()
|
inline void free()
|
||||||
|
Reference in New Issue
Block a user