From: Christopher Faulet Date: Wed, 11 Feb 2026 09:20:12 +0000 (+0100) Subject: BUG/MINOR: flt-trace: Properly compute length of the first DATA block X-Git-Tag: v3.4-dev5~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92307b5fec40007b648d168fb08adc7fffe1ab44;p=thirdparty%2Fhaproxy.git BUG/MINOR: flt-trace: Properly compute length of the first DATA block This bug is quite old. When the length of the first DATA block is computed, the offset is used instead of the block length minus the offset. It is only used with random forwarding and there is a test just after to prevent any issue, so there is no effect. It could be backported to all stable versions. --- diff --git a/src/flt_trace.c b/src/flt_trace.c index 3703dede5..4605013bb 100644 --- a/src/flt_trace.c +++ b/src/flt_trace.c @@ -162,7 +162,7 @@ trace_get_htx_datalen(struct htx *htx, unsigned int offset, unsigned int len) blk = htxret.blk; if (blk && htxret.ret && htx_get_blk_type(blk) == HTX_BLK_DATA) { - data += htxret.ret; + data += htx_get_blksz(blk) - htxret.ret; blk = htx_get_next_blk(htx, blk); } while (blk) {