From 106d40875801a8dfc56e14e87dae2eab4a541432 Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 12 Jun 2003 14:17:10 +0000 Subject: [PATCH] Another failsafe check which I missed. Thnx Erin. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5009 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 8e1e1254..04799a60 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -208,8 +208,8 @@ function sqimap_read_data_list ($imap_stream, $tag_uid, $handle_errors, &$respon } while ($s === "}\r\n"); $s = substr($read,-3); } while ($read{0} !== '*' && - substr($read,0,strlen($tag)) !== $tag); - $resultlist[] = $fetch_data; + substr($read,0,strlen($tag)) !== $tag); + $resultlist[] = $fetch_data; /* release not neaded data */ unset ($fetch_data); } else { @@ -230,7 +230,11 @@ function sqimap_read_data_list ($imap_stream, $tag_uid, $handle_errors, &$respon $data[] = $read; } $read = sqimap_fgets($imap_stream); - if ($read && $read{0} == '*') break; + if ($read === false) { + break 3; /* while switch while */ + } else if ($read{0} == '*') { + break; + } $s = substr($read,-3); } while ($s === "}\r\n"); break 1; -- 2.25.1