]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux_quic: fix overflow on avail_streams
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 22 Oct 2026 12:53:59 +0000 (14:53 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 22 Oct 2026 13:09:56 +0000 (15:09 +0200)
commit6d42822084442cc10ba81275bf2e4d706ececda7
treea21848d496455b938e8d2632c2dd30c572d5b3a5
parent26eeba56821dab9a8a6957620993fd7a92bcb4b5
BUG/MINOR: mux_quic: fix overflow on avail_streams

Function qcc_fctl_avail_streams() return the number of streams which can
still be opened regarding the limit set by the peer.

The return value is a 32 bits integer, used to store the substraction
result. This may overflow as flow control limit is encoded on 64 bits,
which could result either in blocked transfers, or in spurrious error as
mandatory unistreams could not be opened.

Fix this by using a temporary 64 bits value, and cap it to INT_MAX if
needed. This is sufficient as values larger than INT_MAX is out of a
real case usage.

This must be backported up to 2.8.
src/mux_quic.c