From: Felipe Pena Date: Thu, 10 Jul 2008 17:54:08 +0000 (+0000) Subject: - MFB: Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't... X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1318 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cb2c1da196397c48016b3958ec54dee646f3512;p=php - MFB: 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 387f6f1332..30e9497148 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2007,8 +2007,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 { @@ -2016,8 +2016,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 {