mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-03 14:16:23 +00:00
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
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user