# HG changeset patch # User Maxim Dounin # Date 1424875663 -10800 # Node ID 62c098eb4509116af5cf932fd5cdf2515b537052 # Parent c2f309fb7ad27d5beeeaea835fc4df45888d7b02 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. diff -r c2f309fb7ad2 -r 62c098eb4509 src/mail/ngx_mail_auth_http_module.c --- a/src/mail/ngx_mail_auth_http_module.c Tue Feb 24 23:52:47 2015 +0300 +++ b/src/mail/ngx_mail_auth_http_module.c Wed Feb 25 17:47:43 2015 +0300 @@ -1170,9 +1170,9 @@ + 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;