edink Tue Jan 7 06:20:50 2003 EDT Modified files: (Branch: PHP_4_3) /php4/win32 sendmail.c Log: Fixed bug #21442 (Crash of mail() on Windows when the first parameter is empty). Index: php4/win32/sendmail.c diff -u php4/win32/sendmail.c:1.47.2.2 php4/win32/sendmail.c:1.47.2.3 --- php4/win32/sendmail.c:1.47.2.2 Fri Dec 6 17:57:47 2002 +++ php4/win32/sendmail.c Tue Jan 7 06:20:50 2003 @@ -17,7 +17,7 @@ * */ -/* $Id: sendmail.c,v 1.47.2.2 2002/12/06 22:57:47 fmk Exp $ */ +/* $Id: sendmail.c,v 1.47.2.3 2003/01/07 11:20:50 edink Exp $ */ #include "php.h" /*php specific */ #include <stdio.h> @@ -548,12 +548,16 @@ } if ((res = Post("DATA\r\n")) != SUCCESS) { - efree(stripped_header); + if (stripped_header) { + efree(stripped_header); + } return (res); } if ((res = Ack(&server_response)) != SUCCESS) { SMTP_ERROR_RESPONSE(server_response); - efree(stripped_header); + if (stripped_header) { + efree(stripped_header); + } return (res); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php