edink           Tue Jan  7 06:24:17 2003 EDT

  Modified files:              
    /php4/win32 sendmail.c 
  Log:
  MFB:
  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.52 php4/win32/sendmail.c:1.53
--- php4/win32/sendmail.c:1.52  Fri Jan  3 10:17:43 2003
+++ php4/win32/sendmail.c       Tue Jan  7 06:24:17 2003
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.52 2003/01/03 15:17:43 hyanantha Exp $ */
+/* $Id: sendmail.c,v 1.53 2003/01/07 11:24:17 edink Exp $ */
 
 #include "php.h"                               /*php specific */
 #include <stdio.h>
@@ -571,12 +571,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

Reply via email to