Mercurial > hg > nginx
comparison src/mail/ngx_mail_auth_http_module.c @ 5987:62c098eb4509
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 25 Feb 2015 17:47:43 +0300 |
parents | 0cbefdcf82a6 |
children | 3b3f789655dc |
comparison
equal
deleted
inserted
replaced
5986:c2f309fb7ad2 | 5987:62c098eb4509 |
---|---|
1168 + sizeof("Auth-Login-Attempt: ") - 1 + NGX_INT_T_LEN | 1168 + sizeof("Auth-Login-Attempt: ") - 1 + NGX_INT_T_LEN |
1169 + sizeof(CRLF) - 1 | 1169 + sizeof(CRLF) - 1 |
1170 + sizeof("Client-IP: ") - 1 + s->connection->addr_text.len | 1170 + sizeof("Client-IP: ") - 1 + s->connection->addr_text.len |
1171 + sizeof(CRLF) - 1 | 1171 + sizeof(CRLF) - 1 |
1172 + sizeof("Client-Host: ") - 1 + s->host.len + sizeof(CRLF) - 1 | 1172 + sizeof("Client-Host: ") - 1 + s->host.len + sizeof(CRLF) - 1 |
1173 + sizeof("Auth-SMTP-Helo: ") - 1 + s->smtp_helo.len | 1173 + sizeof("Auth-SMTP-Helo: ") - 1 + s->smtp_helo.len + sizeof(CRLF) - 1 |
1174 + sizeof("Auth-SMTP-From: ") - 1 + s->smtp_from.len | 1174 + sizeof("Auth-SMTP-From: ") - 1 + s->smtp_from.len + sizeof(CRLF) - 1 |
1175 + sizeof("Auth-SMTP-To: ") - 1 + s->smtp_to.len | 1175 + sizeof("Auth-SMTP-To: ") - 1 + s->smtp_to.len + sizeof(CRLF) - 1 |
1176 + ahcf->header.len | 1176 + ahcf->header.len |
1177 + sizeof(CRLF) - 1; | 1177 + sizeof(CRLF) - 1; |
1178 | 1178 |
1179 b = ngx_create_temp_buf(pool, len); | 1179 b = ngx_create_temp_buf(pool, len); |
1180 if (b == NULL) { | 1180 if (b == NULL) { |