[core] discard oversized trailers

x-ref:
  "PVS-Studio Analysis Results"
  https://redmine.lighttpd.net/boards/3/topics/8459
  http://www.fly-server.ru/pvs-studio/lighttpd/
This commit is contained in:
Glenn Strauss 2019-02-10 18:19:34 -05:00
parent b2c18f480d
commit 9948537721
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ static handler_t connection_handle_read_post_chunked(server *srv, connection *co
/* ignore excessively long trailers;
* disable keep-alive on connection */
con->keep_alive = 0;
p = c->mem->ptr + buffer_string_length(c->mem) - 4;
}
}
hsz = p + 4 - (c->mem->ptr+c->offset);