mirror of
https://github.com/nginx/nginx.git
synced 2024-12-03 04:39:00 +08:00
Mail: fixed segfault with ssl/starttls at mail{} level and no cert.
A configuration like "mail { starttls on; server {}}" triggered NULL pointer dereference in ngx_mail_ssl_merge_conf() as conf->file was not set.
This commit is contained in:
parent
aa36cc39a4
commit
ef8c64acbe
@ -235,6 +235,11 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
mode = "";
|
||||
}
|
||||
|
||||
if (conf->file == NULL) {
|
||||
conf->file = prev->file;
|
||||
conf->line = prev->line;
|
||||
}
|
||||
|
||||
if (*mode) {
|
||||
|
||||
if (conf->certificate.len == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user