#At file:///home/kgeorge/mysql/work/B48866-5.0-bugteam/ based on revid:staale.smedseng@stripped
2861 Georgi Kodinov 2009-12-09
Bug #48866: mysql.test fails under Fedora 12
strmov() is not guaranteed to work correctly on overlapping
source and destination buffers. On some OSes it may work,
but Fedora 12 has a stpcpy() that's not working correctly
on overlapping buffers.
Fixed to use the overlap-safe memmove() instead.
modified:
client/mysql.cc
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-11-23 22:38:08 +0000
+++ b/client/mysql.cc 2009-12-09 11:02:24 +0000
@@ -4108,7 +4108,7 @@ char *get_arg(char *line, my_bool get_ne
if (*ptr == '\\' && ptr[1]) // escaped character
{
// Remove the backslash
- strmov(ptr, ptr+1);
+ memmove(ptr, ptr+1, strlen(ptr+1) + 1);
}
else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
{
Attachment: [text/bzr-bundle] bzr/joro@sun.com-20091209110224-78kzur7lqdjxoqr5.bundle