Fix for infinite loop when trying to decode multi-part mime attachments
[squirrelmail.git] / class / mime / Message.class.php
index 5f6a040..4e7dc48 100644 (file)
@@ -486,6 +486,10 @@ class Message {
              $i = $iPos;
              break;
           }
+       $iPos++;
+       if ($iPos > strlen($read)) {
+          break;
+       }
        }
         return $s;
     }