diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-01-09 01:35:58 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-01-09 01:35:58 +0000 |
commit | 9058adacc80413f93dab2f7f7514c83d333217a1 (patch) | |
tree | c4bcae5b0a59d0ecf0b72495a33e64fe086398e3 | |
parent | ab99e924507cd45d6a80a215aca5011e8a674fb6 (diff) | |
download | php-git-9058adacc80413f93dab2f7f7514c83d333217a1.tar.gz |
MFH: Fixed bug #26847 (memory leak in mail() when to/subject contain only
spaces).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/standard/mail.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -10,6 +10,8 @@ PHP 4 NEWS - 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) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 8bb69facec..cab90301a5 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -157,10 +157,10 @@ PHP_FUNCTION(mail) 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); } } |