From 58068ee7e1ece98d8d1c66a26235dca9ba35698a Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 6 Sep 2002 17:44:29 +0000 Subject: [PATCH] fix for never ending while loop git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3602 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_messages.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/imap_messages.php b/functions/imap_messages.php index b91d09c7..f50fdee4 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -492,9 +492,9 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list) { foreach ($read as $read_part) { //unfold multi-line headers - while ($prevline && strspn($read_part, "\t ") > 0) { - $read_part = substr($prevline, 0, -2) . ' ' . ltrim($read_part); - } + if ($prevline && strpos($read_part, "\t ") === true) { + $read_part = substr($prevline, 0, -2) . preg_replace('/(\t\s+)/',' ',$read_part); + } $prevline = $read_part; if ($read_part{0} == '*') { if ($internaldate) { -- 2.25.1