iliaa           Thu Jan  8 20:35:59 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       mail.c 
  Log:
  MFH: Fixed bug #26847 (memory leak in mail() when to/subject contain only 
  spaces).
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.519 php-src/NEWS:1.1247.2.520
--- php-src/NEWS:1.1247.2.519   Wed Jan  7 18:51:10 2004
+++ php-src/NEWS        Thu Jan  8 20:35:57 2004
@@ -10,6 +10,8 @@
 - Added a warning when creating temp stream fails with ftp_(n)list(). (Sara)
 - Fixed header handler in NSAPI SAPI module (header->replace was ignored,
   send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces).
+  (Ilia)
 - Fixed bug #26777 (ext/interbase: Let DB handle NULL params). (Ard)
 - Fixed bug #26755 (CLI now overrides php.ini settings and switches off
   output buffering). (Edin)
Index: php-src/ext/standard/mail.c
diff -u php-src/ext/standard/mail.c:1.66.2.11 php-src/ext/standard/mail.c:1.66.2.12
--- php-src/ext/standard/mail.c:1.66.2.11       Mon Oct 20 10:22:10 2003
+++ php-src/ext/standard/mail.c Thu Jan  8 20:35:58 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mail.c,v 1.66.2.11 2003/10/20 14:22:10 iliaa Exp $ */
+/* $Id: mail.c,v 1.66.2.12 2004/01/09 01:35:58 iliaa Exp $ */
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -157,10 +157,10 @@
        if (extra_cmd) {
                efree (extra_cmd);
        }
-       if (to_len > 0) {
+       if (to_r != to) {
                efree(to_r);
        }
-       if (subject_len > 0) {
+       if (subject_r != subject) {
                efree(subject_r);
        }
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to