summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-17 12:33:24 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-17 12:33:24 +0000
commitbc8c03b66221e83417325a495397fa5045780b8d (patch)
tree37aee807ef793200718adb6d24160fae062e4242 /source3/lib
parentcc0202884b1023059769450a4a052431ab362e78 (diff)
downloadsamba-bc8c03b66221e83417325a495397fa5045780b8d.tar.gz
samba-bc8c03b66221e83417325a495397fa5045780b8d.tar.bz2
samba-bc8c03b66221e83417325a495397fa5045780b8d.zip
This is a very nice way to detect pstrcpy() into a malloc()ed string, but
it really is a developer hack... Andrew Bartlett (This used to be commit 3588ebb35b14422141d4070413185195b525038e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_str.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index cd906d37c0..d4291082da 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -442,7 +442,9 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength)
return NULL;
}
+#ifdef DEVELOPER
dest[maxlength]='\0';
+#endif
if (!src) {
*dest = 0;