Allow timezone offsets to be up to 14 hours ahead of UTC. Fixes bug

2003-10-09  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_decode_date): Allow timezone offsets
	to be up to 14 hours ahead of UTC. Fixes bug #49357.

	* broken-date-parser.c (get_tzone): Same.

svn path=/trunk/; revision=22838
This commit is contained in:
Jeffrey Stedfast
2003-10-09 16:46:30 +00:00
committed by Jeffrey Stedfast
parent 015c3706a8
commit 574ed950da
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2003-10-09 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-utils.c (header_decode_date): Allow timezone offsets
to be up to 14 hours ahead of UTC. Fixes bug #49357.
* broken-date-parser.c (get_tzone): Same.
2003-10-08 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (smtp_helo): Removed an

View File

@ -292,7 +292,7 @@ get_tzone (struct _date_token **token)
if (*inptr == '+' || *inptr == '-') {
t = decode_int (inptr, inlen);
if (t < -1200 || t > 1200)
if (t < -1200 || t > 1400)
return -1;
return t;

View File

@ -3562,12 +3562,12 @@ camel_header_decode_date(const char *in, int *saveoffset)
offset = (*inptr++)=='-'?-1:1;
offset = offset * camel_header_decode_int(&inptr);
d(printf("abs signed offset = %d\n", offset));
if (offset < -1200 || offset > 1200)
if (offset < -1200 || offset > 1400)
offset = 0;
} else if (isdigit(*inptr)) {
offset = camel_header_decode_int(&inptr);
d(printf("abs offset = %d\n", offset));
if (offset < -1200 || offset > 1200)
if (offset < -1200 || offset > 1400)
offset = 0;
} else {
char *tz = decode_token(&inptr);