From: Amaury Denoyelle Date: Fri, 22 Dec 2023 15:07:10 +0000 (+0100) Subject: BUG/MINOR: h3: disable fast-forward on buffer alloc failure X-Git-Tag: v3.0-dev1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfa6d4cdd058ea112c461349a39d095ba96825e4;p=thirdparty%2Fhaproxy.git BUG/MINOR: h3: disable fast-forward on buffer alloc failure If QCS Tx buffer cannot be allocated in nego_ff callback, disable fast-forward for this connection and return immediately. If snd_buf is later finally used but still no buffer can being allocated, the connection will be closed on error. This should fix coverity reported in github issue #2390. This should be backported up to 2.9. --- diff --git a/src/h3.c b/src/h3.c index 9874aea843..f020423ffb 100644 --- a/src/h3.c +++ b/src/h3.c @@ -2012,7 +2012,8 @@ static size_t h3_nego_ff(struct qcs *qcs, size_t count) h3_debug_printf(stderr, "%s\n", __func__); if (!(res = qcc_get_stream_txbuf(qcs))) { - /* TODO */ + qcs->sd->iobuf.flags |= IOBUF_FL_NO_FF; + goto end; } /* h3 DATA headers : 1-byte frame type + varint frame length */