summaryrefslogtreecommitdiff
path: root/egg
diff options
context:
space:
mode:
authorAlban Browaeys <prahal@yahoo.com>2017-09-20 23:09:21 +0200
committerDaiki Ueno <dueno@src.gnome.org>2018-03-09 14:52:15 +0100
commit1b5adabfdf64d6bff9302805c3063364b2405f53 (patch)
treeeac0b52cc18f06a79968d2fd5a460a1db010eca0 /egg
parent2a334b964e19321f5bb141a1f39a63a502f3eefd (diff)
downloadgcr-1b5adabfdf64d6bff9302805c3063364b2405f53.tar.gz
egg-asn1x: Fix year 2038 workaround
Check tm_year for "2038 - 1900" not plain 2038. https://bugzilla.gnome.org/show_bug.cgi?id=787963
Diffstat (limited to 'egg')
-rw-r--r--egg/egg-asn1x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/egg/egg-asn1x.c b/egg/egg-asn1x.c
index d918abd..9e427ee 100644
--- a/egg/egg-asn1x.c
+++ b/egg/egg-asn1x.c
@@ -2213,7 +2213,7 @@ anode_read_time (GNode *node,
return anode_failure (node, "invalid time content");
/* In order to work with 32 bit time_t. */
- if (sizeof (time_t) <= 4 && when->tm_year >= 2038) {
+ if (sizeof (time_t) <= 4 && when->tm_year >= 138) {
*value = (time_t)2145914603; /* 2037-12-31 23:23:23 */
/* Convert to seconds since epoch */
@@ -4685,7 +4685,7 @@ egg_asn1x_parse_time_general (const gchar *time, gssize n_time)
return -1;
/* In order to work with 32 bit time_t. */
- if (sizeof (time_t) <= 4 && when.tm_year >= 2038) {
+ if (sizeof (time_t) <= 4 && when.tm_year >= 138) {
value = (time_t)2145914603; /* 2037-12-31 23:23:23 */
/* Convert to seconds since epoch */
@@ -4716,7 +4716,7 @@ egg_asn1x_parse_time_utc (const gchar *time, gssize n_time)
return -1;
/* In order to work with 32 bit time_t. */
- if (sizeof (time_t) <= 4 && when.tm_year >= 2038) {
+ if (sizeof (time_t) <= 4 && when.tm_year >= 138) {
value = (time_t)2145914603; /* 2037-12-31 23:23:23 */
/* Convert to seconds since epoch */