]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: pattern: ensure that payload and payload_lv always stay in the buffer
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Apr 2012 17:19:43 +0000 (19:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 May 2012 18:57:18 +0000 (20:57 +0200)
commit82ea800b0fb2e7dd3d498c4973aa7eef364f208c
tree1c042c0d0b613dbd2cb6fd4162b5ea88beb7faf3
parent0ce3aa0c660991804f3a656126bfb09be7bcbf26
CLEANUP: pattern: ensure that payload and payload_lv always stay in the buffer

A test was already performed which worked by pure luck due to integer types,
otherwise it would have been possible to start checking for an offset out of
the buffer's bounds if the buffer size was large enough to allow an integer
wrap. Let's perform explicit checks and use unsigned ints for offsets instead
of risking being hit later.
src/proto_tcp.c