From c56bdc1cefc7de7b5c50b751aeafa9083aee18e3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 2 May 2003 17:37:11 +0000 Subject: Workaround for POS mailers like the one in bug #42045. 2003-05-01 Jeffrey Stedfast Workaround for POS mailers like the one in bug #42045. * camel-mime-utils.c (header_decode_date): Make sure the numeric timezone is between -1200 and 1200, otherwise it is invalid. * broken-date-parser.c (get_tzone): Make sure the numeric timezone is between -1200 and 1200, otherwise it is invalid. svn path=/trunk/; revision=21048 --- camel/broken-date-parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'camel/broken-date-parser.c') diff --git a/camel/broken-date-parser.c b/camel/broken-date-parser.c index f6e697896c..7dcdf1e61e 100644 --- a/camel/broken-date-parser.c +++ b/camel/broken-date-parser.c @@ -291,7 +291,11 @@ get_tzone (struct _date_token **token) inend = inptr + inlen; if (*inptr == '+' || *inptr == '-') { - return decode_int (inptr, inlen); + t = decode_int (inptr, inlen); + if (t < -1200 || t > 1200) + return -1; + + return t; } else { if (*inptr == '(') { inptr++; -- cgit v1.2.3