]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: use BUG_ON() on missing request start-line
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 17 Jun 2025 08:25:30 +0000 (10:25 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 17 Jun 2025 09:39:35 +0000 (11:39 +0200)
Convert BUG_ON_HOT() statements to BUG_ON() if HTX start-line is either
missing or duplicated when transcoding into a HTTP/3 request. This
ensures that such abnormal conditions will be detected even on default
builds.

This is linked to coverity report #3008.

src/h3.c

index 75a2afbe2f6ffaa1149f28699521693119948a48..4f25f1f7065a507fd9c06f42aaa0765c171b6efb 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1978,7 +1978,7 @@ static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
                        break;
 
                case HTX_BLK_REQ_SL:
-                       BUG_ON_HOT(sl); /* Only one start-line expected */
+                       BUG_ON(sl); /* Only one start-line expected */
                        sl = htx_get_blk_ptr(htx, blk);
                        meth = htx_sl_req_meth(sl);
                        uri = htx_sl_req_uri(sl);
@@ -2000,7 +2000,7 @@ static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
        }
 
  end_loop:
-       BUG_ON_HOT(!sl); /* start-line must be present. */
+       BUG_ON(!sl); /* start-line must be present. */
        /* marker for end of headers */
        list[hdr].n = ist("");