[MEDIUM] ensure we never overflow in chunk_printf()
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Jul 2007 12:38:45 +0000 (14:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 Sep 2007 19:09:28 +0000 (21:09 +0200)
commitdceaa0894bd73c19d0d7130f571ac869b52f339d
tree265cb2ba8176498ff931bf4fc7916e8f9ddab90f
parentca769dc631af414778b09a14803248b99ac83b5b
[MEDIUM] ensure we never overflow in chunk_printf()

The result of the vsnprintf() called in chunk_printf() must be checked,
and should be added only if lower than the requested size. We simply
return zero if we cannot write the chunk.
src/buffers.c