]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux-h1: Fix zero-copy forwarding when sending chunks of unknown size
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 12 Feb 2024 10:29:01 +0000 (11:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Feb 2024 13:22:36 +0000 (14:22 +0100)
commit3ee3a7937a1e2f1f852c58b239d0e1b933f9a0f0
tree24f9cf202e69a4b903080721f1706ed70ae011a3
parent167e38e0e0296e899aa894d2f3db5ba2a0c68cb5
BUG/MAJOR: mux-h1: Fix zero-copy forwarding when sending chunks of unknown size

Commit 91b77c1632 ("MEDIUM: mux-h1: Support zero-copy forwarding for chunks with
an unknown size") was recently pushed but it contains 3 bugs. The first one is
during the nego. The extra size reserved for the CRLF at the end of the chunk
must not be added to the offset value. Indeed, the CRLF will be appended after
the data and not prepended to them.

The second one, still during the nego, is an integer overflow when the available
room in the output buffer is computed.

Finally, the last one is when the chunk itself is formatted. This part was
totally buggy if the output buffer was not empty at the beginning.

No backport needed.
src/mux_h1.c