diff options
author | Georgi Kodinov <joro@sun.com> | 2009-12-16 19:31:19 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-12-16 19:31:19 +0200 |
commit | adc17cd41e21cb68d63b9962a97ad075da02999f (patch) | |
tree | 3ced378450a6cc83a82e27f10b1d7183ae48f151 /include | |
parent | 1f55f5b617d0df650161c58f7d0707abd4ca42e2 (diff) | |
download | mariadb-git-adc17cd41e21cb68d63b9962a97ad075da02999f.tar.gz |
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 version of strmov instead.
Re-vitalized the overlap-safe version of strmov.
Diffstat (limited to 'include')
-rw-r--r-- | include/m_string.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/m_string.h b/include/m_string.h index c26d0fb9260..5411d0483ea 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -108,9 +108,7 @@ extern char NEAR _dig_vec_lower[]; /* Defined in strtod.c */ extern const double log_10[309]; -#ifdef BAD_STRING_COMPILER -#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1) -#else +#ifndef strmov #define strmov_overlapp(A,B) strmov(A,B) #define strmake_overlapp(A,B,C) strmake(A,B,C) #endif @@ -171,12 +169,11 @@ extern uint strinstr(const char *str,const char *search); extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search); extern char *strkey(char *dst,char *head,char *tail,char *flags); extern char *strmake(char *dst,const char *src,uint length); -#ifndef strmake_overlapp -extern char *strmake_overlapp(char *dst,const char *src, uint length); -#endif #ifndef strmov extern char *strmov(char *dst,const char *src); +#else +extern char *strmov_overlapp(char *dst,const char *src); #endif extern char *strnmov(char *dst,const char *src,uint n); extern char *strsuff(const char *src,const char *suffix); |