Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/htx.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,9 @@ struct htx_blk *htx_add_header(struct htx *htx, const struct ist name,
{
struct htx_blk *blk;

/* FIXME: check name.len (< 256B) and value.len (< 1MB) */
if (name.len > 255 || value.len > 1048575)
return NULL;

blk = htx_add_blk(htx, HTX_BLK_HDR, name.len + value.len);
if (!blk)
return NULL;
Expand All @@ -878,7 +880,9 @@ struct htx_blk *htx_add_trailer(struct htx *htx, const struct ist name,
{
struct htx_blk *blk;

/* FIXME: check name.len (< 256B) and value.len (< 1MB) */
if (name.len > 255 || value.len > 1048575)
return NULL;

blk = htx_add_blk(htx, HTX_BLK_TLR, name.len + value.len);
if (!blk)
return NULL;
Expand Down