Skip to content

fix nginx crash issue #681 #722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions nginx/modsecurity/apr_bucket_nginx.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ move_brigade_to_chain(apr_bucket_brigade *bb, ngx_chain_t **ll, ngx_pool_t *pool
}

cl->buf->last_buf = 1;
cl->next = NULL;
*ll = cl;
} else {
cl->buf->last_buf = 1;
cl->next = NULL;
}
apr_brigade_cleanup(bb);
return NGX_OK;
Expand Down
2 changes: 2 additions & 0 deletions nginx/modsecurity/ngx_http_modsecurity.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ ngx_http_modsecurity_load_request(ngx_http_request_t *r)
req->parsed_uri.path = (char *)ngx_pstrdup0(r->pool, &r->uri);
req->parsed_uri.is_initialized = 1;

req->parsed_uri.hostname = (char *)ngx_pstrdup0(r->pool, &r->headers_in.host);

str.data = r->port_start;
str.len = r->port_end - r->port_start;
req->parsed_uri.port = ngx_atoi(str.data, str.len);
Expand Down