]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] fix buffer_skip() and buffer_si_getline() to correctly handle wrap-arounds
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2009 20:56:07 +0000 (22:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2009 21:52:14 +0000 (23:52 +0200)
commit2e1dd3d21350ad5eef7f688eee0c75e140430190
tree0efa0f7af04f6eec9fdc0efbebb51d3cf45c8e13
parentfb0e9209a905e4e4fe1b913bd0d912066fcc3a2c
[BUG] fix buffer_skip() and buffer_si_getline() to correctly handle wrap-arounds

Those two functions did not correctly deal with full buffers and/or
buffers that wrapped around. Buffer_skip() was even able to incorrectly
set buf->w further than the end of buffer if its len argument was wrong,
and buffer_si_getline() was able to incorrectly return a length larger
than the effective buffer data available.
include/proto/buffers.h
src/buffers.c