summaryrefslogtreecommitdiff
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-02 17:37:11 +0000
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-02 17:37:11 +0000
commitb8ec588fd418e6c347f02f49a4320ad3d6d5abbb (patch)
treed70455979eb29410936b3bacc2ac5788d147b5e2 /camel/camel-mime-utils.c
parentd0cec0972f6c0bcf6f0449869623e33800823206 (diff)
downloadevolution-data-server-b8ec588fd418e6c347f02f49a4320ad3d6d5abbb.tar.gz
Workaround for POS mailers like the one in bug #42045.
2003-05-01 Jeffrey Stedfast <fejj@ximian.com> 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.
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 6ba498ffa..907d61b5d 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -3506,9 +3506,13 @@ header_decode_date(const char *in, int *saveoffset)
offset = (*inptr++)=='-'?-1:1;
offset = offset * header_decode_int(&inptr);
d(printf("abs signed offset = %d\n", offset));
+ if (offset < -1200 || offset > 1200)
+ offset = 0;
} else if (isdigit(*inptr)) {
offset = header_decode_int(&inptr);
d(printf("abs offset = %d\n", offset));
+ if (offset < -1200 || offset > 1200)
+ offset = 0;
} else {
char *tz = decode_token(&inptr);