From: Felipe Pena Date: Thu, 10 Jul 2008 17:44:09 +0000 (+0000) Subject: - Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't accept... X-Git-Tag: php-5.2.7RC1~222 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26da69af359a81be8dcfe742c9d6d5a8d781eb60;p=php - Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't accept lengths of 1024) --- diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index b9756c0968..61ec708575 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1587,8 +1587,8 @@ PHP_FUNCTION(imap_headerinfo) convert_to_long_ex(msgno); if (myargc >= 3) { convert_to_long_ex(fromlength); - 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); + 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 0 and %d", MAILTMPLEN); RETURN_FALSE; } } else { @@ -1596,8 +1596,8 @@ PHP_FUNCTION(imap_headerinfo) } if (myargc >= 4) { convert_to_long_ex(subjectlength); - 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); + 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 0 and %d", MAILTMPLEN); RETURN_FALSE; } } else {