mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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()
|
||||
{
|
||||
Ptr[str_length--]= '\0';
|
||||
str_length--;
|
||||
Ptr[str_length]= '\0';
|
||||
DBUG_ASSERT(strlen(Ptr) == str_length);
|
||||
}
|
||||
|
||||
inline void free()
|
||||
|
Reference in New Issue
Block a user