mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
backport valgrind cleanups from 6.0-engines
mysql-test/valgrind.supp: silence valgrind warning of memory leak in dlopen strings/strmake.c: silence valgrind warning cause by strlen examining unset bytes.
This commit is contained in:
@@ -41,9 +41,9 @@ char *strmake(register char *dst, register const char *src, size_t length)
|
||||
write a character rather than '\0' as this makes spotting these
|
||||
problems in the results easier.
|
||||
*/
|
||||
uint n= strlen(src) + 1;
|
||||
if (n <= length)
|
||||
memset(dst + n, (int) 'Z', length - n + 1);
|
||||
uint n= 0;
|
||||
while (n < length && src[n++]);
|
||||
memset(dst + n, (int) 'Z', length - n + 1);
|
||||
#endif
|
||||
|
||||
while (length--)
|
||||
|
Reference in New Issue
Block a user