mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MINOR: h3: fix uninitialized value in h3_req_headers_send()
Due to the introduction of smallbuf usage for HTTP/3 headers emission, ret variable may be used uninitialized if buffer allocation fails due to not enough room in QUIC connection window. Fix this by setting ret value to 0. Function variable declaration are also adjusted so that the pattern is similar to h3_resp_headers_send(). Finally, outbuf buffer is also removed as it is now unused. No need to backport.
This commit is contained in:
parent
cbbbf4ea43
commit
e02939108e
5
src/h3.c
5
src/h3.c
@ -2002,8 +2002,8 @@ static int h3_encode_header(struct buffer *buf,
|
||||
*/
|
||||
static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
|
||||
{
|
||||
int err;
|
||||
struct http_hdr list[global.tune.max_http_hdr * 2];
|
||||
struct buffer outbuf;
|
||||
struct buffer headers_buf = BUF_NULL;
|
||||
struct buffer *res;
|
||||
enum htx_blk_type type;
|
||||
@ -2012,7 +2012,8 @@ static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
|
||||
struct ist meth, uri, scheme = IST_NULL, auth = IST_NULL;
|
||||
int frame_length_size; /* size in bytes of frame length varint field */
|
||||
int smallbuf = 1;
|
||||
int ret, err, hdr;
|
||||
int ret = 0;
|
||||
int hdr;
|
||||
|
||||
TRACE_ENTER(H3_EV_TX_FRAME|H3_EV_TX_HDR, qcs->qcc->conn, qcs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user