From 8ebb83f3e342a95c887d0d5a3732bfe68e9a4d8f Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Thu, 4 Oct 2001 11:18:36 +0000 Subject: [PATCH] While getting data from a stream it is possible to reach the end, so we should check it to avoid an infinite loop. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1542 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/mime.php b/functions/mime.php index 4b49faf4..52a452ea 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -64,7 +64,7 @@ $read = fgets ($imap_stream, 10000); $response = substr($read, 0, 4); $bodystructure = ""; - while ($response != "a001") { + while ($response != 'a001' ) && !feof( $imap_stream ) { $bodystructure .= $read; $read = fgets ($imap_stream, 10000); $response = substr($read, 0, 4); -- 2.25.1