From ff34119940da108c0fab43aae6c27d928046a1bf 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. --- functions/mime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/mime.php b/functions/mime.php index 4b49faf41..52a452ea6 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);