mysql8.4/mysql-strmov.patch

27 lines
943 B
Diff
Raw Normal View History

Remove overly optimistic definition of strmov() as stpcpy().
mysql uses this macro with overlapping source and destination strings,
which is verboten per spec, and fails on some Red Hat platforms.
Deleting the definition is sufficient to make it fall back to a
byte-at-a-time copy loop, which should consistently give the
expected behavior.
diff -Naur mysql-5.1.37.orig/include/m_string.h mysql-5.1.37/include/m_string.h
--- mysql-5.1.37.orig/include/m_string.h 2009-07-13 19:08:50.000000000 -0400
+++ mysql-5.1.37/include/m_string.h 2009-08-31 21:49:49.000000000 -0400
@@ -81,13 +81,6 @@
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
-#if defined(HAVE_STPCPY)
-#define strmov(A,B) stpcpy((A),(B))
-#ifndef stpcpy
-extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
-#endif
-#endif
-
/* Declared in int2str() */
extern char NEAR _dig_vec_upper[];
extern char NEAR _dig_vec_lower[];