mirror of
https://github.com/nginx/nginx.git
synced 2026-06-25 19:37:00 +00: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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue