MDEV-7019 String::chop() is wrong and may potentially crash (MySQL bug#56492)
Merging a fix from the upstream.
This commit is contained in:
parent
2da6f7ceba
commit
b84a892fb2
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user