CVS update: samba/source

Andrew Tridgell tridge at samba.anu.edu.au
Tue May 12 22:44:41 EST 1998


Date:	Tuesday May 12, 1998 @ 22:44
Author:	tridge

Update of /data/cvs/samba/source
In directory samba:/tmp/cvs-serv27706

Modified Files:
      Tag: BRANCH_1_9_18
	slprintf.c 
Log Message:
a new slprintf() function. This one is totally portable but a bit of a
kludge. It is a safe kludge with our current code but I would like to
revisit it at some point in the future.

The problem with the one I committed yesterday is it used non-portable
functions. (it also had a bug in it, but that's another matter)

This one works by just using vsprintf() into a 8k buffer and a memcpy
from there. No memory protection tricks or other non-portable
stuff. This is safe because all calls to slprintf() in samba use
strings which have been through a pstrcpy and thus are less than 1024
bytes. No call uses more than 2 of these strings. See what I mean by
kludge? Note that the 8k is way overkill but I like overkill :)

Someday (after autoconf) we will replace this with something better,
but meanwhile this is simple, secure and portable.



More information about the samba-cvs mailing list