Re: cvs: php4 /ext/imap php_imap.c
| From: | Andi Gutmans | Date: | Fri, 18 Aug 2000 08:09:12 +0000 |
| Subject: | Re: cvs: php4 /ext/imap php_imap.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-1211@lists.php.net to get a copy of this message | ||
Are you sure this fix doesn't leak memory?
Andi
At 04:01 PM 8/17/00 +0000, Chuck Hagenbuch wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/chagenbu Thu Aug 17 09:01:15 2000 EDTModified files:/php4/ext/imap php_imap.cLog: prevent mail_criteria from munging the variable passed in containing the query - just had to add a cpystr(). if this isn't the right fix, let me know, but it does work. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.40 php4/ext/imap/php_imap.c:1.41--- php4/ext/imap/php_imap.c:1.40 Thu Aug 10 10:38:14 2000 +++ php4/ext/imap/php_imap.c Thu Aug 17 09:01:14 2000@@ -25,7 +25,7 @@| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+*/ -/* $Id: php_imap.c,v 1.40 2000/08/10 17:38:14 joey Exp $ */ +/* $Id: php_imap.c,v 1.41 2000/08/17 16:01:14 chagenbu Exp $ */ #define IMAP41 @@ -3411,7 +3411,7 @@}IMAPG(imap_messages) = NIL; - mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(Z_STRVAL_PP(criteria)), flags); + mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(cpystr(Z_STRVAL_PP(criteria))), flags); if (IMAPG(imap_messages) == NIL) { RETURN_FALSE; }-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net