diff options
author | thomascube <thomas@roundcube.net> | 2008-08-14 10:36:54 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-08-14 10:36:54 +0000 |
commit | 1b5deba5fa2e39fc8d32294b0b71577e382357fa (patch) | |
tree | d691d4da5834ef3087c8793e2fd5d7556594b427 /program | |
parent | 9a5762a4de13a23a45ac9b85ff475aaf877cf906 (diff) |
Prevent from endless recursion when structure string is chopped
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/mime.inc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/program/lib/mime.inc b/program/lib/mime.inc index a25658692..6dd3926b8 100644 --- a/program/lib/mime.inc +++ b/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){ |