[Samba] Samba 4.2.0rc4 fails to start up
Volker.Lendecke at SerNet.DE
Wed Feb 11 22:58:01 MST 2015
On Wed, Feb 11, 2015 at 05:18:51PM -0500, Thomas Schulz wrote:
> I went ahead and hand compiled it. It dies with a Segmentation Fault.
> The problem line is:
> if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
> If I comment that one out then it runs OK and prints 1.
> So the Solaris snprintf is most lilely not good enough.
Unfortunately we have a lot of places in the DEBUG code where NULL could
happen and we hope for snprintf to print "<null>". The standard says
that "The argument shall be a pointer to an array of char.", which NULL
probably does not fulfill. The right thing would be to eliminate this
use of snprintf, but I'm not sure if we can catch all of them.
You might want to try running without this line, so the system snprintf
is used. But you might face some crashes in particular with higher debug
levels. With debug level 0 or one, it should not happen, but it might
when trying to diagnose problems. We're happy to fix those NULLs when
you find and report them :-)
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba