Welcome! Log In Create A New Profile

Advanced

[nginx] Mail: fixed buffer allocation for CRLF after Auth-SMTP-*...

Maxim Dounin
February 25, 2015 10:00AM
details: http://hg.nginx.org/nginx/rev/62c098eb4509
branches:
changeset: 5987:62c098eb4509
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Feb 25 17:47:43 2015 +0300
description:
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:

src/mail/ngx_mail_auth_http_module.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diffs (16 lines):

diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
--- 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_ma
+ 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;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Mail: fixed buffer allocation for CRLF after Auth-SMTP-*...

Maxim Dounin 706 February 25, 2015 10:00AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 220
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready