From: philippe_mingo Date: Thu, 4 Oct 2001 11:18:36 +0000 (+0000) Subject: While getting data from a stream it is possible to reach the end, so we should check... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=8ebb83f3e342a95c887d0d5a3732bfe68e9a4d8f 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 --- 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);