From 1e09ecc2802d6b331d3f986dc705d8ae80313e4d Mon Sep 17 00:00:00 2001 From: kink Date: Sun, 4 Nov 2007 10:12:58 +0000 Subject: [PATCH] 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). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12758 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 3 +++ class/mime/Message.class.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8d1a77bc..c8088c9c 100644 --- a/ChangeLog +++ b/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) -------------------------------------- diff --git a/class/mime/Message.class.php b/class/mime/Message.class.php index 87449abb..dc12c197 100644 --- a/class/mime/Message.class.php +++ b/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; -- 2.25.1