diff options
author | Chuck Hagenbuch <chagenbu@php.net> | 2000-04-04 18:10:24 +0000 |
---|---|---|
committer | Chuck Hagenbuch <chagenbu@php.net> | 2000-04-04 18:10:24 +0000 |
commit | 44e178e0891ab019b480a4621f22f27a899e2aeb (patch) | |
tree | ad5ab8caedf4b98eae67b101a6881c7fd1ce29aa /ext/imap/php_imap.c | |
parent | ebce1ad78728fdb57d6dabc88b3bd1b3de309098 (diff) | |
download | php-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.c | 2 |
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 { |