iliaa           Wed Apr  2 16:26:39 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/imap   php_imap.c 
  Log:
  
  Fixed bug #44613 (Crash inside imap_headerinfo())
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.7&r2=1.208.2.7.2.26.2.8&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.7 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.8
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.7      Tue Apr  1 18:48:11 2008
+++ php-src/ext/imap/php_imap.c Wed Apr  2 16:26:39 2008
@@ -26,7 +26,7 @@
    | PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>                       |
    +----------------------------------------------------------------------+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.7 2008/04/01 18:48:11 felipe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.8 2008/04/02 16:26:39 iliaa Exp $ */
 
 #define IMAP41
 
@@ -1593,8 +1593,8 @@
        convert_to_long_ex(msgno);
        if (myargc >= 3) {
                convert_to_long_ex(fromlength);
-               if (Z_LVAL_PP(fromlength) < 0) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "From 
length has to be greater than or equal to 0");
+               if (Z_LVAL_PP(fromlength) < 0 || Z_LVAL_PP(fromlength) >= 
MAILTMPLEN) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "From 
length has to be between 1 and %i", MAILTMPLEN);
                        RETURN_FALSE;
                }
        } else {
@@ -1602,8 +1602,8 @@
        }
        if (myargc >= 4) {
                convert_to_long_ex(subjectlength);
-               if (Z_LVAL_PP(subjectlength) < 0) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject 
length has to be greater than or equal to 0");
+               if (Z_LVAL_PP(subjectlength) < 0 || Z_LVAL_PP(subjectlength) >= 
MAILTMPLEN) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject 
length has to be between 1 and %i", MAILTMPLEN);
                        RETURN_FALSE;
                }
        } else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to