1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

backport valgrind cleanups from 6.0-engines

This commit is contained in:
acurtis/antony@xiphis.org/ltamd64.xiphis.org
2008-02-19 13:46:54 -08:00
parent f6c3587eab
commit d2ad8286a0
2 changed files with 16 additions and 3 deletions

View File

@ -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--)