From: Amaury Denoyelle Date: Tue, 11 Jan 2022 13:20:46 +0000 (+0100) Subject: MINOR: quic: fix return of quic_dgram_read X-Git-Tag: v2.6-dev1~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce340fe4a72d987c95602e8c57a40dd5c6658b05;p=thirdparty%2Fhaproxy.git MINOR: quic: fix return of quic_dgram_read It is expected that quic_dgram_read() returns the total number of bytes read. Fix the return value when the read has been successful. This bug has no impact as in the end the return value is not checked by the caller. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 23eae2239a..558e7048ff 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -5371,7 +5371,7 @@ static ssize_t quic_dgram_read(struct buffer *buf, size_t len, void *owner, if (dgram_ctx.qc) dgram_ctx.qc->rx.bytes += len; - return pos - (unsigned char *)buf; + return pos - (unsigned char *)b_head(buf); err: return -1;