diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-05-12 12:48:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-05-12 12:48:54 +0000 |
commit | 1dadc7af9534977c8c384fd3e54e506710fb3659 (patch) | |
tree | dcb17d07171b884cb259475b5504c63e6fad1c15 /source3/rpc_server | |
parent | f888868f46a5418bac9ab528497136c152895305 (diff) | |
download | samba-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/rpc_server')
0 files changed, 0 insertions, 0 deletions