Browse Source

Fix off-by-one in bodystructure parsing triggered by servers sending
a body location part (e.g. Sun Java System Messaging Server). Thanks
John Callahan (#1808382).

Thijs Kinkhorst 17 years ago
parent
commit
f197218fd3
2 changed files with 4 additions and 1 deletions
  1. 3 0
      ChangeLog
  2. 1 1
      class/mime/Message.class.php

+ 3 - 0
ChangeLog

@@ -229,6 +229,9 @@ Version 1.5.2 - SVN
     "not defined" error on session timeouts.
   - Allow custom session handlers to work correctly (and be defined at the
     application level with SquirrelMail).
+  - Fix off-by-one in bodystructure parsing triggered by servers sending
+    a body location part (e.g. Sun Java System Messaging Server). Thanks
+    John Callahan (#1808382).
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------

+ 1 - 1
class/mime/Message.class.php

@@ -820,7 +820,7 @@ class Message {
      * @return integer
      */
     function parseParenthesis($read, $i) {
-        for (; $read{$i} != ')'; ++$i) {
+        for ($i++; $read{$i} != ')'; ++$i) {
             switch ($read{$i}) {
                 case '"': $this->parseQuote($read, $i); break;
                 case '{': $this->parseLiteral($read, $i); break;