summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2015-02-25 17:47:43 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2015-02-25 17:47:43 +0300
commit52c5ba0f377b18c543735baa019a166f25059a7f (patch)
tree559271f9067c546ef85f1a940d466a1b8b9bdeb2 /src
parentc2c9a1c03e0a1700779dbe5d01276a65a368ae3d (diff)
downloadnginx-52c5ba0f377b18c543735baa019a166f25059a7f.tar.gz
nginx-52c5ba0f377b18c543735baa019a166f25059a7f.tar.bz2
Mail: fixed buffer allocation for CRLF after Auth-SMTP-* headers.
There were no buffer overruns in real life as there is extra space allocated for the Auth-Login-Attempt counter.
Diffstat (limited to 'src')
-rw-r--r--src/mail/ngx_mail_auth_http_module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
index eb7531c80..f040ec194 100644
--- a/src/mail/ngx_mail_auth_http_module.c
+++ b/src/mail/ngx_mail_auth_http_module.c
@@ -1170,9 +1170,9 @@ ngx_mail_auth_http_create_request(ngx_mail_session_t *s, ngx_pool_t *pool,
+ sizeof("Client-IP: ") - 1 + s->connection->addr_text.len
+ sizeof(CRLF) - 1
+ sizeof("Client-Host: ") - 1 + s->host.len + sizeof(CRLF) - 1
- + sizeof("Auth-SMTP-Helo: ") - 1 + s->smtp_helo.len
- + sizeof("Auth-SMTP-From: ") - 1 + s->smtp_from.len
- + sizeof("Auth-SMTP-To: ") - 1 + s->smtp_to.len
+ + sizeof("Auth-SMTP-Helo: ") - 1 + s->smtp_helo.len + sizeof(CRLF) - 1
+ + sizeof("Auth-SMTP-From: ") - 1 + s->smtp_from.len + sizeof(CRLF) - 1
+ + sizeof("Auth-SMTP-To: ") - 1 + s->smtp_to.len + sizeof(CRLF) - 1
+ ahcf->header.len
+ sizeof(CRLF) - 1;