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 | 4cfcc398c35c6726f14f485ae8e9ebcef180392f (patch) | |
tree | 63993294aa603ea24229c96cdae1665442f9893e /source/utils/make_smbcodepage.c | |
parent | 2d774454005f0b54e5684cf618da7060594dfcbb (diff) | |
download | samba-4cfcc398c35c6726f14f485ae8e9ebcef180392f.tar.gz samba-4cfcc398c35c6726f14f485ae8e9ebcef180392f.tar.xz samba-4cfcc398c35c6726f14f485ae8e9ebcef180392f.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.
Diffstat (limited to 'source/utils/make_smbcodepage.c')
0 files changed, 0 insertions, 0 deletions