svn commit: samba r20110 - in branches/SAMBA_3_0/source/lib: .
jra at samba.org
jra at samba.org
Mon Dec 11 18:56:37 GMT 2006
Author: jra
Date: 2006-12-11 18:56:36 +0000 (Mon, 11 Dec 2006)
New Revision: 20110
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20110
Log:
Fix interaction between paranoid malloc checker
and lib/replace. Found by Herb - thanks !
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/util.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c 2006-12-11 17:04:43 UTC (rev 20109)
+++ branches/SAMBA_3_0/source/lib/util.c 2006-12-11 18:56:36 UTC (rev 20110)
@@ -2434,8 +2434,16 @@
#undef strdup
#endif
#endif
+
+#ifndef HAVE_STRDUP
+#define strdup rep_strdup
+#endif
+
char *s1 = strdup(s);
#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strdup
+#undef strdup
+#endif
#define strdup(s) __ERROR_DONT_USE_STRDUP_DIRECTLY
#endif
if (!s1)
@@ -2455,8 +2463,17 @@
#undef strndup
#endif
#endif
+
+#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
+#undef HAVE_STRNDUP
+#define strndup rep_strndup
+#endif
+
char *s1 = strndup(s, n);
#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strndup
+#undef strndup
+#endif
#define strndup(s,n) __ERROR_DONT_USE_STRNDUP_DIRECTLY
#endif
if (!s1)
More information about the samba-cvs
mailing list