cvs: php-src(PHP_5_0) /ext/imap php_imap.c
| From: | Antony Dovgal | Date: | Thu, 20 Jan 2005 18:08:54 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /ext/imap php_imap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30041@lists.php.net to get a copy of this message | ||
tony2001 Thu Jan 20 13:08:54 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/imap php_imap.c
Log:
MFH: fix segfault in imap_sort()
http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.184.2.13&r2=1.184.2.14&ty=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.184.2.13 php-src/ext/imap/php_imap.c:1.184.2.14
--- php-src/ext/imap/php_imap.c:1.184.2.13 Thu Jan 20 09:11:36 2005
+++ php-src/ext/imap/php_imap.c Thu Jan 20 13:08:54 2005
@@ -26,7 +26,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.184.2.13 2005/01/20 14:11:36 tony2001 Exp $ */
+/* $Id: php_imap.c,v 1.184.2.14 2005/01/20 18:08:54 tony2001 Exp $ */
#define IMAP41
@@ -2467,8 +2467,13 @@
}
if (myargc >= 4) {
convert_to_long_ex(flags);
+ if (Z_LVAL_PP(flags) < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Search options parameter has to be greater
than or equal to 0cannot be less than 0");
+ RETURN_FALSE;
+ }
}
if (myargc >= 5) {
+ convert_to_string_ex(criteria);
search_criteria = estrndup(Z_STRVAL_PP(criteria), Z_STRLEN_PP(criteria));
spg = mail_criteria(search_criteria);
efree(search_criteria);