summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2004-12-30 05:31:55 +0000
committerfoobar <sniper@php.net>2004-12-30 05:31:55 +0000
commit57eddbd7d079e8bdfd196eb455e7da60b22a5f3a (patch)
tree6e60fef78a9741052ce678fe0c3af2ab98e2536f /ext/imap/php_imap.c
parentf47d6bc193f0c1355b6890a2b4d2f473789e46d0 (diff)
downloadphp-git-57eddbd7d079e8bdfd196eb455e7da60b22a5f3a.tar.gz
- Fixed the crash and leak.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index ad463f5d4c..a81a0137ca 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -2980,7 +2980,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) {
@@ -3194,9 +3194,7 @@ PHP_FUNCTION(imap_mail_compose)
RETVAL_STRING(tempstring, 0);
done:
-#if ilia_0 /* this should be done, otherwise we leak memory. Unfortunately this seems to cause a crash in some cases */
mail_free_body(&topbod);
-#endif
mail_free_envelope(&env);
}
/* }}} */