diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-01-18 16:34:04 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-01-18 16:34:04 +0000 |
commit | 9ccca60a1f4cb583f4b43d720de0dff84828e21b (patch) | |
tree | 093acfaa2f3603ad3cda47f030723bc64bfa9820 | |
parent | aec129db7f95aea15071b2d829fe52f02ad9b116 (diff) | |
download | php-git-9ccca60a1f4cb583f4b43d720de0dff84828e21b.tar.gz |
MFH: Fixed bug #31480 (Possible infinite loop in imap_mail_compose()).
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/imap/php_imap.c | 5 |
2 files changed, 3 insertions, 3 deletions
@@ -4,6 +4,7 @@ PHP 4 NEWS - Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus) - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony) - Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia) +- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia) - Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia) - Fixed bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref). (Tony) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 19bbf33c2b..e7a3381b3c 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3060,7 +3060,7 @@ PHP_FUNCTION(imap_mail_compose) bod->contents.text.size = Z_STRLEN_PP(pvalue); } else { bod->contents.text.data = (char *) fs_get(1); - bod->contents.text.data = ""; + memcpy(bod->contents.text.data, "", 1); bod->contents.text.size = 0; } if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) { @@ -3075,9 +3075,8 @@ PHP_FUNCTION(imap_mail_compose) convert_to_string_ex(pvalue); bod->md5 = cpystr(Z_STRVAL_PP(pvalue)); } - - zend_hash_move_forward(Z_ARRVAL_PP(body)); } + zend_hash_move_forward(Z_ARRVAL_PP(body)); } rfc822_encode_body_7bit(env, topbod); |