iliaa           Thu Jan  8 20:35:45 2004 EDT

  Modified files:              
    /php-src/ext/standard       mail.c 
  Log:
  Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces)
  
  
Index: php-src/ext/standard/mail.c
diff -u php-src/ext/standard/mail.c:1.81 php-src/ext/standard/mail.c:1.82
--- php-src/ext/standard/mail.c:1.81    Thu Jan  8 03:17:33 2004
+++ php-src/ext/standard/mail.c Thu Jan  8 20:35:44 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mail.c,v 1.81 2004/01/08 08:17:33 andi Exp $ */
+/* $Id: mail.c,v 1.82 2004/01/09 01:35:44 iliaa Exp $ */
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -160,10 +160,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