Skip to content

Commit f75312d

Browse files
plumplumliplumplumli
andauthored
Fix: infinite loop in parse_header_data() when HTTP/3 header length exceeds 65535 (#69)
Co-authored-by: plumplumli <plumplumli@tencent.com>
1 parent 778b53d commit f75312d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lsqpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,7 @@ header_out_grow_buf (struct lsqpack_dec *dec,
33183318
size = 2;
33193319
need = read_ctx->hbrc_out.xhdr->val_len + size / 2;
33203320
if (need > LSXPACK_MAX_STRLEN)
3321-
need = LSXPACK_MAX_STRLEN;
3321+
return -1;
33223322
read_ctx->hbrc_out.xhdr = dec->qpd_dh_if->dhi_prepare_decode(
33233323
read_ctx->hbrc_hblock, read_ctx->hbrc_out.xhdr, need);
33243324
if (!read_ctx->hbrc_out.xhdr)

0 commit comments

Comments
 (0)