summaryrefslogtreecommitdiff
path: root/user/dovecot/time64.patch
blob: c6f8e6261fc63ff0dabeb4e485ea4e017b49e32a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c.old	2020-08-12 12:20:41.000000000 +0000
+++ dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c	2020-09-15 14:21:24.285796733 +0000
@@ -31,13 +31,13 @@
 }
 
 static int get_time_field(const struct json_tree *tree, const char *key,
-			  long *value_r)
+			  long long *value_r)
 {
 	const char *value = get_field(tree, key);
 	int tz_offset ATTR_UNUSED;
 	if (value == NULL)
 		return 0;
-	if ((str_to_long(value, value_r) < 0 &&
+	if ((str_to_llong(value, value_r) < 0 &&
 	     !iso8601_date_parse((const unsigned char*)value, strlen(value),
 				 value_r, &tz_offset)) ||
 	    *value_r < 0)
@@ -283,9 +283,9 @@
 	const char *sub = get_field(tree, "sub");
 
 	int ret;
-	long t0 = time(NULL);
+	long long t0 = time(NULL);
 	/* default IAT and NBF to now */
-	long iat, nbf, exp;
+	long long iat, nbf, exp;
 	int tz_offset ATTR_UNUSED;
 
 	if (sub == NULL) {