From 25cb0add9651e280e51bcbd616fc7d8faef8fedf Mon Sep 17 00:00:00 2001 From: thomasb Date: Thu, 14 Aug 2008 10:36:54 +0000 Subject: Prevent from endless recursion when structure string is chopped git-svn-id: https://svn.roundcube.net/trunk@1645 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/lib/mime.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/lib/mime.inc b/roundcubemail/program/lib/mime.inc index a25658692..6dd3926b8 100644 --- a/roundcubemail/program/lib/mime.inc +++ b/roundcubemail/program/lib/mime.inc @@ -63,12 +63,9 @@ function iml_ParseBSString($str){ $i++; $endPos = iml_ClosingParenPos($str, $i); $partLen = $endPos - $i; + if ($partLen < 0) break; $part = substr($str, $i, $partLen); $a[$id] = iml_ParseBSString($part); //send part string - if ($verbose){ - echo "{>".$endPos."}"; - flush(); - } $i = $endPos; }else $a[$id].=$str[$i]; //add to current element in array }else if ($in_quote){ -- cgit v1.2.3