summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorChuck Hagenbuch <chagenbu@php.net>2000-04-04 18:10:24 +0000
committerChuck Hagenbuch <chagenbu@php.net>2000-04-04 18:10:24 +0000
commit44e178e0891ab019b480a4621f22f27a899e2aeb (patch)
treead5ab8caedf4b98eae67b101a6881c7fd1ce29aa /ext/imap/php_imap.c
parentebce1ad78728fdb57d6dabc88b3bd1b3de309098 (diff)
downloadphp-git-44e178e0891ab019b480a4621f22f27a899e2aeb.tar.gz
return false after determining that a message number is bad, instead of
going on to crash.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index e06bc7b5d7..6cf20e420b 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -1566,7 +1566,9 @@ PHP_FUNCTION(imap_headerinfo)
if (!msgno->value.lval || msgno->value.lval < 1 || (unsigned) msgno->value.lval > imap_le_struct->imap_stream->nmsgs) {
php_error(E_WARNING, "Bad message number");
+ RETURN_FALSE;
}
+
if (mail_fetchstructure(imap_le_struct->imap_stream, msgno->value.lval, NIL)) {
cache = mail_elt(imap_le_struct->imap_stream, msgno->value.lval);
} else {