diff options
author | Felipe Pena <felipe@php.net> | 2008-07-10 17:50:51 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-07-10 17:50:51 +0000 |
commit | b82c9b946123c7279dccce97dc04f864b444e17f (patch) | |
tree | aac353f54dedb1507e6f1c20b86292d732059675 /ext/imap/php_imap.c | |
parent | 478234b2356fd331727451f59542bd26de32f029 (diff) | |
download | php-git-b82c9b946123c7279dccce97dc04f864b444e17f.tar.gz |
- MFB: Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't accept lengths of 1024)
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index e377eb27a8..c09d7e8380 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1977,16 +1977,16 @@ PHP_FUNCTION(imap_headerinfo) ZEND_FETCH_RESOURCE(imap_le_struct, pils *, &streamind, -1, "imap", le_imap); if (argc >= 3) { - if (fromlength < 0 || fromlength >= MAILTMPLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be between 1 and %i", MAILTMPLEN); + if (fromlength < 0 || fromlength > MAILTMPLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be between 0 and %d", MAILTMPLEN); RETURN_FALSE; } } else { fromlength = 0x00; } if (argc >= 4) { - if (subjectlength < 0 || subjectlength >= MAILTMPLEN) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be between 1 and %i", MAILTMPLEN); + if (subjectlength < 0 || subjectlength > MAILTMPLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be between 0 and %d", MAILTMPLEN); RETURN_FALSE; } } else { |