0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd::http: Increase buffer size; report proper error for exceeding.

This commit is contained in:
Jason Volk 2020-11-05 18:18:33 -08:00
parent 6fe770b4bf
commit c9b1b37505

View file

@ -586,9 +586,15 @@ void
ircd::http::assign(response::head &head,
const header &header)
{
char buf[64];
char buf[96];
const auto &[key_, val] {header};
assert(size(key_) <= sizeof(buf));
if(unlikely(size(key_) > sizeof(buf)))
throw error
{
REQUEST_HEADER_FIELDS_TOO_LARGE
};
const auto &key
{
tolower(buf, key_)