Date: 02/29/00
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3632 Updated: Abort trap"
- Previous message: Bug Database: "[PHP-DEV] Bug #3663 Updated: get_mailboxes imap function documentation"
- Next in thread: Frank M. Kromann: "[PHP-DEV] cvs: /php3/functions imap.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
chagenbu Tue Feb 29 11:56:29 2000 EDT
Modified files:
/php3/functions imap.c
Log:
Fix Bug id #3632 (same fix for 4.0 coming in a moment) by doing a sanity
check to make sure we don't try and fetch a message that doesn't exist. This
is probably needed in several other functions, as well (imap_fetchstructure
comes to mind) - I'll look into that when I have a chance.
Index: php3/functions/imap.c
diff -u php3/functions/imap.c:1.85 php3/functions/imap.c:1.86
--- php3/functions/imap.c:1.85 Fri Feb 25 22:57:40 2000
+++ php3/functions/imap.c Tue Feb 29 11:56:29 2000
@@ -33,7 +33,7 @@
| Andrew Skalski <askalski <email protected>> |
+----------------------------------------------------------------------+
*/
-/* $Id: imap.c,v 1.85 2000/02/26 06:57:40 chagenbu Exp $ */
+/* $Id: imap.c,v 1.86 2000/02/29 19:56:29 chagenbu Exp $ */
#define IMAP41
@@ -2955,6 +2955,12 @@
php3_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
+
+ if ((msgno->value.lval < 1) || (msgno->value.lval > imap_le_struct->imap_stream->nmsgs)) {
+ php3_error(E_WARNING, "Bad message number");
+ RETURN_FALSE;
+ }
+
RETVAL_STRING(mail_fetchheader_full (imap_le_struct->imap_stream,msgno->value.lval,NIL,NIL,myargc == 3 ? flags->value.lval : NIL),1);
}
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3632 Updated: Abort trap"
- Previous message: Bug Database: "[PHP-DEV] Bug #3663 Updated: get_mailboxes imap function documentation"
- Next in thread: Frank M. Kromann: "[PHP-DEV] cvs: /php3/functions imap.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

