iliaa Tue Jan 16 00:11:53 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/win32 sendmail.c Log: Added buffer length checks http://cvs.php.net/viewvc.cgi/php-src/win32/sendmail.c?r1=1.47.2.10.2.3&r2=1.47.2.10.2.4&diff_format=u Index: php-src/win32/sendmail.c diff -u php-src/win32/sendmail.c:1.47.2.10.2.3 php-src/win32/sendmail.c:1.47.2.10.2.4 --- php-src/win32/sendmail.c:1.47.2.10.2.3 Fri Jan 6 01:10:21 2006 +++ php-src/win32/sendmail.c Tue Jan 16 00:11:53 2007 @@ -17,7 +17,7 @@ * */ -/* $Id: sendmail.c,v 1.47.2.10.2.3 2006/01/06 01:10:21 sniper Exp $ */ +/* $Id: sendmail.c,v 1.47.2.10.2.4 2007/01/16 00:11:53 iliaa Exp $ */ #include "php.h" /*php specific */ #include <stdio.h> @@ -486,7 +486,7 @@ while(token != NULL) { SMTP_SKIP_SPACE(token); - sprintf(Buffer, "RCPT TO:<%s>\r\n", token); + snprintf(Buffer, MAIL_BUFFER_SIZE, "RCPT TO:<%s>\r\n", token); if ((res = Post(Buffer)) != SUCCESS) return (res); if ((res = Ack(&server_response)) != SUCCESS) { @@ -542,7 +542,7 @@ while(token != NULL) { SMTP_SKIP_SPACE(token); - sprintf(Buffer, "RCPT TO:<%s>\r\n", token); + snprintf(Buffer, MAIL_BUFFER_SIZE, "RCPT TO:<%s>\r\n", token); if ((res = Post(Buffer)) != SUCCESS) { return (res); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php