mirror of
https://github.com/nginx/nginx.git
synced 2025-06-09 02:42:48 +08:00
Fixed segfault on configuration testing with ssl (ticket #37).
The following config caused segmentation fault due to conf->file not being properly set if "ssl on" was inherited from the http level: http { ssl on; server { } }
This commit is contained in:
parent
0d59500343
commit
ca495238bd
@ -346,7 +346,16 @@ ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
|
|||||||
|
|
||||||
ngx_pool_cleanup_t *cln;
|
ngx_pool_cleanup_t *cln;
|
||||||
|
|
||||||
ngx_conf_merge_value(conf->enable, prev->enable, 0);
|
if (conf->enable == NGX_CONF_UNSET) {
|
||||||
|
if (prev->enable == NGX_CONF_UNSET) {
|
||||||
|
conf->enable = 0;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
conf->enable = prev->enable;
|
||||||
|
conf->file = prev->file;
|
||||||
|
conf->line = prev->line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngx_conf_merge_value(conf->session_timeout,
|
ngx_conf_merge_value(conf->session_timeout,
|
||||||
prev->session_timeout, 300);
|
prev->session_timeout, 300);
|
||||||
|
Loading…
Reference in New Issue
Block a user