summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-05-12 12:48:54 +0000
committerAndrew Tridgell <tridge@samba.org>1998-05-12 12:48:54 +0000
commit1dadc7af9534977c8c384fd3e54e506710fb3659 (patch)
treedcb17d07171b884cb259475b5504c63e6fad1c15 /source3/script
parentf888868f46a5418bac9ab528497136c152895305 (diff)
downloadsamba-1dadc7af9534977c8c384fd3e54e506710fb3659.tar.gz
samba-1dadc7af9534977c8c384fd3e54e506710fb3659.tar.bz2
samba-1dadc7af9534977c8c384fd3e54e506710fb3659.zip
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. (This used to be commit 4cfcc398c35c6726f14f485ae8e9ebcef180392f)
Diffstat (limited to 'source3/script')
0 files changed, 0 insertions, 0 deletions