]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Use buf_room_for_htx_data() to detect too large messages
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Jun 2019 12:56:27 +0000 (14:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Jun 2019 13:23:06 +0000 (15:23 +0200)
commite5438b749c6381f7cb7c63155669f375b51943ff
treec32866b506329fd8f203e3d41db64fb9d060568e
parent1d5ec0944f3a9204a56ca5978a062f27a6f0d98d
BUG/MEDIUM: mux-h1: Use buf_room_for_htx_data() to detect too large messages

During headers parsing, an error is returned if the message is too large and
does not fit in the input buffer. The mux h1 used the function b_full() to do
so. But to allow zero copy transfers, in h1_recv(), the input buffer is
pre-aligned and thus few bytes remains always free.

To fix the bug, as during the trailers parsing, the function
buf_room_for_htx_data() should be used instead.

This patch must be backported to 2.0 and 1.9.
src/mux_h1.c