1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

mod_http2: some DoS protection, fix for read after free

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733113 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Eissing
2016-03-01 17:19:25 +00:00
parent 66c700aa62
commit c828bbc586
12 changed files with 294 additions and 42 deletions

View File

@@ -60,10 +60,6 @@ h2_request *h2_request_createn(int id, apr_pool_t *pool,
return req;
}
void h2_request_destroy(h2_request *req)
{
}
static apr_status_t inspect_clen(h2_request *req, const char *s)
{
char *end;
@@ -342,11 +338,22 @@ void h2_request_copy(apr_pool_t *p, h2_request *dst, const h2_request *src)
dst->authority = OPT_COPY(p, src->authority);
dst->path = OPT_COPY(p, src->path);
dst->headers = apr_table_clone(p, src->headers);
if (src->trailers) {
dst->trailers = apr_table_clone(p, src->trailers);
}
dst->content_length = src->content_length;
dst->chunked = src->chunked;
dst->eoh = src->eoh;
}
h2_request *h2_request_clone(apr_pool_t *p, const h2_request *src)
{
h2_request *nreq = apr_pcalloc(p, sizeof(*nreq));
memcpy(nreq, src, sizeof(*nreq));
h2_request_copy(p, nreq, src);
return nreq;
}
request_rec *h2_request_create_rec(const h2_request *req, conn_rec *conn)
{
request_rec *r;