]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Non checked returned value for cs_new() in h3_decode_qcs()
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 15 Feb 2022 08:25:06 +0000 (09:25 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Feb 2022 16:33:21 +0000 (17:33 +0100)
This should fix CID 1469664 for GH #1546

src/h3.c

index a7f0cda8f77a5ce42cdd61d623d8388abc1dd5f2..b9e4d5e5a58fa06d51f470c135836c044af739f7 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -176,6 +176,9 @@ static int h3_headers_to_htx(struct qcs *qcs, struct buffer *buf, uint64_t len,
                htx->flags |= HTX_FL_EOM;
 
        cs = cs_new(qcs->qcc->conn, qcs->qcc->conn->target);
+       if (!cs)
+               return 1;
+
        cs->flags |= CS_FL_NOT_FIRST;
        cs->ctx = qcs;
        stream_create_from_cs(cs, &htx_buf);