cvs: php4(PHP_4_3) /win32 sendmail.c
| From: | Edin Kadribasic | Date: | Tue, 07 Jan 2003 11:20:50 +0000 |
| Subject: | cvs: php4(PHP_4_3) /win32 sendmail.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-17710@lists.php.net to get a copy of this message | ||
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);
}