iliaa Tue Dec 21 10:47:39 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/imap php_imap.c Log: MFH: Fixed possible crash in imap_mail_compose(). http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.142.2.28&r2=1.142.2.29&ty=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.142.2.28 php-src/ext/imap/php_imap.c:1.142.2.29 --- php-src/ext/imap/php_imap.c:1.142.2.28 Thu Aug 12 15:32:59 2004 +++ php-src/ext/imap/php_imap.c Tue Dec 21 10:47:38 2004 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.142.2.28 2004/08/12 19:32:59 chagenbu Exp $ */ +/* $Id: php_imap.c,v 1.142.2.29 2004/12/21 15:47:38 iliaa Exp $ */ #define IMAP41 @@ -2949,6 +2949,10 @@ bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1); memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue)+1); bod->contents.text.size = Z_STRLEN_PP(pvalue); + } else { + bod->contents.text.data = (char *) fs_get(1); + bod->contents.text.data = ""; + bod->contents.text.size = 0; } if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) { convert_to_long_ex(pvalue); @@ -3052,6 +3056,10 @@ bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1); memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue) + 1); bod->contents.text.size = Z_STRLEN_PP(pvalue); + } else { + bod->contents.text.data = (char *) fs_get(1); + bod->contents.text.data = ""; + bod->contents.text.size = 0; } if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) { convert_to_long_ex(pvalue);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php