]> git.ipfire.org Git - thirdparty/squid.git/commit
Fixed snprintf() off-by-one bug and found out that snprintf()
authorwessels <>
Fri, 24 Apr 1998 02:11:09 +0000 (02:11 +0000)
committerwessels <>
Fri, 24 Apr 1998 02:11:09 +0000 (02:11 +0000)
commit461d2ef6be2ae032f07943fcf95168bc6c972d2d
tree6c143730aa2e7681720556bda3e357b65bee51cc
parent4455552a70b2f8a420996da30d476a4595615480
Fixed snprintf() off-by-one bug and found out that snprintf()
might emulate sprintf() behaviour with len == 0 args.

Now. we assert() that sprintf() length is >= 0.  If len == 0, then
strx_printv() silently returns, leaving the buffer untouched.
lib/snprintf.c