#At file:///home/kgeorge/mysql/work/fixvg-5.0-bugteam/ based on revid:joro@stripped
2802 Georgi Kodinov 2009-07-08
Bug #46042: backported the fix for the valgrind warning from 5.1
modified:
strings/strmake.c
=== modified file 'strings/strmake.c'
--- a/strings/strmake.c 2007-11-26 08:00:41 +0000
+++ b/strings/strmake.c 2009-07-08 14:49:21 +0000
@@ -41,9 +41,9 @@ char *strmake(register char *dst, regist
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--)
Attachment: [text/bzr-bundle] bzr/joro@sun.com-20090708144921-sm2vgto3dw4x6sbm.bundle
| Thread |
|---|
| • bzr commit into mysql-5.0-bugteam branch (joro:2802) Bug#46042 | Georgi Kodinov | 8 Jul |