Skip to content
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

Fixed segfault in ngx_http_find_virtual_server() within xquic module #1813

Merged
merged 1 commit into from
Aug 4, 2023
Merged
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
5 changes: 5 additions & 0 deletions modules/ngx_http_xquic_module/ngx_http_xquic.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,18 @@ ngx_http_v3_cert_cb(const char *sni, void **chain,
}
#endif

/* The ngx_http_find_virtual_server() function requires ngx_http_connection_t in c->data */
c->data = hc;

/*
* get the server core conf by sni, this is useful when multiple server
* block listen on the same port. but useless when there is noly a single
* server block
*/
ret = ngx_http_find_virtual_server_inner(c,
hc->addr_conf->virtual_names, &host, NULL, &cscf);
c->data = qc;

if (ret == NGX_OK) {
hc->ssl_servername = ngx_palloc(c->pool, sizeof(ngx_str_t));
if (hc->ssl_servername == NULL) {
Expand Down