endless loop fix
[squirrelmail.git] / class / mime / Message.class.php
index 59fa5eae717b3cde55bb2854b9b72f63e3da9441..0cec7e2432f7979f06a24c9cae2bbb706a1ae1c5 100644 (file)
@@ -387,7 +387,7 @@ class Message {
                     $arg_a[] = $this->parseLiteral($read, $i);
                    /* temp bugfix (SM 1.5 will have a working clean version)
                       too much work to implement that version right now */
-                   --$i;
+//                 --$i;
                     ++$arg_no;
                     break;
                 case 'N':
@@ -465,6 +465,9 @@ class Message {
           /* Now read the literal */
           $s = ($lit_cnt ? substr($read,$i,$lit_cnt): '');
           $i += $lit_cnt;
+          /* temp bugfix (SM 1.5 will have a working clean version)
+             too much work to implement that version right now */
+          --$i;
        } else { /* should never happen */
           $i += 3; /* } + \r + \n */
           $s = '';
@@ -477,7 +480,7 @@ class Message {
        $iPos = ++$i;
        while (true) {
           $iPos = strpos($read,'"',$iPos);
-          if ($iPos === false) break;
+          if (!$iPos) break;
           if ($iPos && $read{$iPos -1} != '\\') {
              $s = substr($read,$i,($iPos-$i));
              $i = $iPos;