diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-24 15:22:37 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-24 15:22:37 +0000 |
commit | 46dd11fbb66a9b7647a09239b99f3b914b4bad8a (patch) | |
tree | 1c56c89fc02bffe6657c4802d60145f8b9f3d954 /src/util/make.code.defn | |
parent | 051b4e81e2296d3c02836aee3ec815309a037f70 (diff) |
Added Util_asprintf,Util_asnprintf,Util_snprintf,Util_vsnprintf.
asprintf is like sprintf, but the first arg is a char ** and should basically be
the address of a null pointer. The routine allocates enough space and passes back
the new buffer pointer.
asnprintf is as above, but the buffer need not be null. The thirs argument is the
size of the current buffer, and if the string would be larger than that, the current
buffer is freed and a new buffer big enough is allocated.
snprintf and vsnprintf are pretty standard, except we don't have them on all platforms
so I hunted down a file on the internet, written by Patrick Powel (papowell@astart.com),
to give us a portable version of the functionality. It may not be entirely up to
scratch with floating point - I've not tested it too thouroughly yet.
This should enable us to make the web-server stuff a bit more secure against buffer-overruns.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2209 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/make.code.defn')
-rw-r--r-- | src/util/make.code.defn | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/make.code.defn b/src/util/make.code.defn index a19d541a..3b505258 100644 --- a/src/util/make.code.defn +++ b/src/util/make.code.defn @@ -12,6 +12,7 @@ SKBinTree.c\ Hash.c\ Cache.c\ Malloc.c\ +snprintf.c\ String.c\ StringList.c\ Time.c\ |