svn commit: samba r15896 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at samba.org tridge at samba.org
Fri May 26 02:25:01 GMT 2006


Author: tridge
Date: 2006-05-26 02:25:00 +0000 (Fri, 26 May 2006)
New Revision: 15896

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15896

Log:

we're getting a lot of crashes on the build farm due to people
assuming that printf("%s", NULL) is OK. The problem is that it is ok
with recent versions of glibc, so the bug isn't noticed by most
developers.

This configure change ensures that we replace snprintf() if it doesn't
handle NULL strings. Then we just need to make sure we use d_printf()
instead of printf() in torture tests to display possibly NULL strings.

Modified:
   branches/SAMBA_4_0/source/lib/replace/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/config.m4	2006-05-26 00:13:06 UTC (rev 15895)
+++ branches/SAMBA_4_0/source/lib/replace/config.m4	2006-05-26 02:25:00 UTC (rev 15896)
@@ -107,6 +107,7 @@
        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
 
        if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(1);
+       if (snprintf(buf, 20, "%s", 0) < 3) exit(1);
 
        exit(0);
 }



More information about the samba-cvs mailing list