MINOR: h3: use BUG_ON() on missing request start-line

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.
This commit is contained in:
Amaury Denoyelle 2025-06-17 10:25:30 +02:00
parent 2284aa0d6a
commit f972f7d9e9

View File

@ -1978,7 +1978,7 @@ static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
break; break;
case HTX_BLK_REQ_SL: 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); sl = htx_get_blk_ptr(htx, blk);
meth = htx_sl_req_meth(sl); meth = htx_sl_req_meth(sl);
uri = htx_sl_req_uri(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: end_loop:
BUG_ON_HOT(!sl); /* start-line must be present. */ BUG_ON(!sl); /* start-line must be present. */
/* marker for end of headers */ /* marker for end of headers */
list[hdr].n = ist(""); list[hdr].n = ist("");