]> git.kaiwu.me - haproxy.git/commit
[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>
Wed, 25 Jul 2007 12:38:45 +0000 (14:38 +0200)
commit24dd9f5c8b5b863052715be97e4abd4ebf85e08a
treebe01532bf241ecd2b5394f206e40fea94dfb56c5
parent0fa0fddb398d10cc68a0976d52abf7e5bdcaceea
[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