From 8084e2cbf5046cfe5ce87511e9a18aac51e73f92 Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 2 Feb 2002 17:25:35 +0000 Subject: [PATCH] Partially fixed #511204 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2344 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index a5955e6c..12a6c257 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -69,7 +69,9 @@ function sqimap_read_data_list ($imap_stream, $pre, $handle_errors, $data = array(); $total_size = 0; while (strpos($read, "\n") === false) { - $read .= fgets($imap_stream, 9096); + if(!($read .= fgets($imap_stream, 9096))) { + break; + } } if (ereg("^\\* [0-9]+ FETCH.*\\{([0-9]+)\\}", $read, $regs)) { @@ -84,7 +86,9 @@ function sqimap_read_data_list ($imap_stream, $pre, $handle_errors, } while (1) { while (strpos($read, "\n") === false) { - $read .= fgets($imap_stream, 9096); + if(!($read .= fgets($imap_stream, 9096))) { + break; + } } // If we know the size, no need to look at the end parameters if ($size > 0) { -- 2.25.1