aboutsummaryrefslogtreecommitdiff
path: root/lib/parsedate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parsedate.c')
-rw-r--r--lib/parsedate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c
index 1ddd0080a..0262f13aa 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -526,7 +526,7 @@ static int parsedate(const char *date, time_t *output)
/* Add the time zone diff between local time zone and GMT. */
long delta = (long)(tzoff!=-1?tzoff:0);
- if((delta>0) && (t + delta < t))
+ if((delta>0) && (t > LONG_MAX - delta))
return -1; /* time_t overflow */
t += delta;