diff --git a/ChangeLog b/ChangeLog index ac1d44989..949e1f667 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-15 Richard Frith-Macdonald + + * Source/Additions/GSMime.m: Ensure last line of base64 encoded data + is terminated with crlf for clients which have buggy base64 decodedrs. + 2005-03-15 Richard Frith-Macdonald * Source/Additions/GSMime.m: Mark ([setDefaultEncoding:]) as deprecated diff --git a/Source/Additions/GSMime.m b/Source/Additions/GSMime.m index ea74cb959..e0beead95 100644 --- a/Source/Additions/GSMime.m +++ b/Source/Additions/GSMime.m @@ -4582,7 +4582,11 @@ static NSCharacterSet *tokenSet = nil; [md appendBytes: "\r\n" length: 2]; pos += 76; } - [md appendBytes: &ptr[pos] length: len-pos]; + if (pos < len) + { + [md appendBytes: &ptr[pos] length: len-pos]; + [md appendBytes: "\r\n" length: 2]; + } } else if ([[enc value] isEqualToString: @"x-uuencode"] == YES) {