summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-07-10 17:44:09 +0000
committerFelipe Pena <felipe@php.net>2008-07-10 17:44:09 +0000
commit26da69af359a81be8dcfe742c9d6d5a8d781eb60 (patch)
tree716fbe001a8deeb0d6bf3e3f63ceb8f3010e1952 /ext
parent72c5f9c02de187ef01411a979d89216a37600614 (diff)
downloadphp-git-26da69af359a81be8dcfe742c9d6d5a8d781eb60.tar.gz
- Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't accept lengths of 1024)
Diffstat (limited to 'ext')
-rw-r--r--ext/imap/php_imap.c8
1 files changed, 4 insertions, 4 deletions
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 {