]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-fcgi: Use relative offset to compute contig data in demux buf
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2026 14:31:32 +0000 (16:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2026 16:28:07 +0000 (18:28 +0200)
commit3ffbf5539e7a278c8ae7efaf6286d8b2ce80d79a
treef8b50e4600c3698e553ac51e0f80c6a5b62c160d
parent3843f48faf3aee2cee827d5ae93bf72ba7f86530
BUG/MINOR: mux-fcgi: Use relative offset to compute contig data in demux buf

b_contig_data() should be called with a head-relative offset (0 for the
beginning of readable data). However, in the FCGI multiplexer, to get
contiguous data available in the demux buffer, it is called with
b_head_ofs(dbuf) which returns an absolute buffer position (b->head). So
b->head is counted twice. Because of this bug, the demux buffer could be
realigned while it should not and conversely.

Instead, the offset 0 must be used. So let's fix it.

This patch must be backported as far as 2.4.
src/mux_fcgi.c