Commit 2f58197d authored by Georgi Kodinov's avatar Georgi Kodinov

Bug #46042: backported the fix for the valgrind warning from 5.1

parent 12729660
...@@ -41,8 +41,8 @@ char *strmake(register char *dst, register const char *src, uint length) ...@@ -41,8 +41,8 @@ char *strmake(register char *dst, register const char *src, uint length)
write a character rather than '\0' as this makes spotting these write a character rather than '\0' as this makes spotting these
problems in the results easier. problems in the results easier.
*/ */
uint n= strlen(src) + 1; uint n= 0;
if (n <= length) while (n < length && src[n++]);
memset(dst + n, (int) 'Z', length - n + 1); memset(dst + n, (int) 'Z', length - n + 1);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment