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.sogomaint-2.0.2
parent
633c7be228
commit
87f02a755d
|
@ -2984,7 +2984,18 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
|
||||||
if (_la(self, 0) != ')') {
|
if (_la(self, 0) != ')') {
|
||||||
_consume(self,1);
|
_consume(self,1);
|
||||||
[dict setObject: _parseBodyString(self, YES)
|
[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
|
- (NSException *)exceptionForFailedMatch:(unsigned char)_match
|
||||||
got:(unsigned char)_avail
|
got:(unsigned char)_avail
|
||||||
{
|
{
|
||||||
@@ -2225,9 +2545,9 @@
|
@@ -2225,9 +2549,9 @@
|
||||||
[s release];
|
[s release];
|
||||||
|
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
|
|
Loading…
Reference in New Issue