]> git.lizzy.rs Git - zlib.git/commit
Replace use of unsafe string functions with snprintf if available.
authorMark Adler <madler@alumni.caltech.edu>
Thu, 3 May 2012 06:18:38 +0000 (23:18 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 3 May 2012 06:18:38 +0000 (23:18 -0700)
commitc58f7ab28d5fc346032592414055db4edcc18050
treedfbaf405ca98d3101fb8c7319c17846b23c6aad5
parent2689b3cceb054f83d4d084ffc1db09606b0c2515
Replace use of unsafe string functions with snprintf if available.

This avoids warnings in OpenBSD that apparently can't be turned
off whenever you link strcpy, strcat, or sprintf.  When snprintf
isn't available, the use of the "unsafe" string functions has
always in fact been safe, since the lengths are all checked before
those functions are called.

We do not use strlcpy or strlcat, since they are not (yet) found on
all systems.  snprintf on the other hand is part of the C standard
library and is very common.
gzlib.c
test/minigzip.c