]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: peers: bound stick-table acknowledge messages
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 14:17:28 +0000 (15:17 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 14:53:46 +0000 (15:53 +0100)
commit96aab75ba6e6c5194b3a29e7b6fd33712e1aafd5
treea641a353df2301307cb0b0564ff1290870e2378f
parent67392268bf6fe1d04d93dbe1f15c81bd9cb6b08e
BUG/MINOR: peers: bound stick-table acknowledge messages

peer_prepare_ackmsg() was the last message builder of the peers code
still encoding without knowing the buffer end: lengths went through
intencode(), which cannot fail, and the last acknowledged update counter
was copied with a plain memcpy().

Its payload is a bounded varint plus a 32-bit counter, i.e. 9 bytes at
most, so it could not overflow. The bounds are added anyway, for
consistency with the update and switch message builders, and they make
intencode() unused: being defined without any prototype in a header, the
compiler cannot report it as unused, so it is removed here along with its
comment, otherwise it would have stayed in the binary silently.

Must be backported to all stable versions.
src/peers.c