From 5cfe46741aaafa4fb1d1831ad2c4954519573124 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Fri, 2 Nov 2007 20:46:05 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1226 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOPE/sope-patchset-r1546.diff | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/SOPE/sope-patchset-r1546.diff b/SOPE/sope-patchset-r1546.diff index a767369a..92700bcd 100644 --- a/SOPE/sope-patchset-r1546.diff +++ b/SOPE/sope-patchset-r1546.diff @@ -228,6 +228,40 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m - (NSException *)exceptionForFailedMatch:(unsigned char)_match got:(unsigned char)_avail { +Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m +=================================================================== +--- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1546) ++++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (copie de travail) +@@ -285,24 +285,16 @@ + - (id)parseValue:(id)_data ofHeaderField:(NSString *)_field { + // TODO: use UNICODE + NSCalendarDate *date = nil; +- unsigned char buf[256]; +- unsigned char *bytes = buf, *pe; ++ unsigned char *bytes, *pe; + unsigned length = 0; + NSTimeZone *tz = nil; + char dayOfMonth, monthOfYear, hour, minute, second; + short year; + BOOL flag; +- +- if ((length = [_data cStringLength]) > 254) { +- [self logWithFormat: +- @"header field value to large for date parsing: '%@'(%i)", +- _data, length]; +- length = 254; +- } +- +- [_data getCString:(char *)buf maxLength:length]; +- buf[length] = '\0'; +- ++ ++ length = [_data length]; ++ bytes = [_data cString]; ++ + /* remove leading chars (skip to first digit, the day of the month) */ + while (length > 0 && (!isdigit(*bytes))) { + bytes++; Index: sope-mime/NGMime/NGMimeBodyPart.m =================================================================== --- sope-mime/NGMime/NGMimeBodyPart.m (révision 1546) -- 2.39.5