From 87f02a755d52129c5ae9bba8edd8fe72a8ef521e Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 23 Jun 2010 19:46:51 +0000 Subject: [PATCH] Fixed an IMAP crasher when quotes were present in mail headers Monotone-Parent: 8e1a3af5628f31703023508d2fb742a933691c15 Monotone-Revision: 3316e8de631c5da2b7ba6c4505fa74b707b80b51 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-06-23T19:46:51 Monotone-Branch: ca.inverse.sogo --- SOPE/sope-patchset-r1664.diff | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/SOPE/sope-patchset-r1664.diff b/SOPE/sope-patchset-r1664.diff index 1860c796a..96d9bc415 100644 --- a/SOPE/sope-patchset-r1664.diff +++ b/SOPE/sope-patchset-r1664.diff @@ -2984,7 +2984,18 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m if (_la(self, 0) != ')') { _consume(self,1); [dict setObject: _parseBodyString(self, YES) -@@ -2170,6 +2475,21 @@ +@@ -2090,6 +2395,10 @@ + cnt = 0; + str = nil; + while ((c = _la(self, 0)) != _c) { ++ if (c == '\\') { ++ _consume(self, 1); ++ c = _la(self, 0); ++ } + buf[cnt] = c; + _consume(self, 1); + cnt++; +@@ -2170,6 +2479,21 @@ } } @@ -3006,7 +3017,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m - (NSException *)exceptionForFailedMatch:(unsigned char)_match got:(unsigned char)_avail { -@@ -2225,9 +2545,9 @@ +@@ -2225,9 +2549,9 @@ [s release]; if (c == '\n') {