This is a very nice way to detect pstrcpy() into a malloc()ed string, but
authorAndrew Bartlett <abartlet@samba.org>
Mon, 17 Feb 2003 12:33:24 +0000 (12:33 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 17 Feb 2003 12:33:24 +0000 (12:33 +0000)
it really is a developer hack...

Andrew Bartlett

source/lib/util_str.c

index cd906d37c00a78dc8732b07c39fcfc2beb37cabc..d4291082da470ad15e9fdeb81ec28e7be14ea0ad 100644 (file)
@@ -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;