Blame SOURCES/dhcp-64_bit_lease_parse.patch

324fcf
diff -up dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse dhcp-4.3.0a1/common/parse.c
324fcf
--- dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse	2013-12-11 01:25:12.000000000 +0100
324fcf
+++ dhcp-4.3.0a1/common/parse.c	2013-12-19 15:45:25.990771814 +0100
324fcf
@@ -938,8 +938,8 @@ TIME
324fcf
 parse_date_core(cfile)
324fcf
 	struct parse *cfile;
324fcf
 {
324fcf
-	int guess;
324fcf
-	int tzoff, year, mon, mday, hour, min, sec;
324fcf
+	TIME guess;
324fcf
+	long int tzoff, year, mon, mday, hour, min, sec;
324fcf
 	const char *val;
324fcf
 	enum dhcp_token token;
324fcf
 	static int months[11] = { 31, 59, 90, 120, 151, 181,
324fcf
@@ -965,7 +965,7 @@ parse_date_core(cfile)
324fcf
 		}
324fcf
 
324fcf
 		skip_token(&val, NULL, cfile); /* consume number */
324fcf
-		guess = atoi(val);
324fcf
+		guess = atol(val);
324fcf
 
324fcf
 		return((TIME)guess);
324fcf
 	}
324fcf
@@ -993,7 +993,7 @@ parse_date_core(cfile)
324fcf
 	   somebody invents a time machine, I think we can safely disregard
324fcf
 	   it.   This actually works around a stupid Y2K bug that was present
324fcf
 	   in a very early beta release of dhcpd. */
324fcf
-	year = atoi(val);
324fcf
+	year = atol(val);
324fcf
 	if (year > 1900)
324fcf
 		year -= 1900;
324fcf
 
324fcf
@@ -1039,7 +1039,7 @@ parse_date_core(cfile)
324fcf
 		return((TIME)0);
324fcf
 	}
324fcf
 	skip_token(&val, NULL, cfile); /* consume day of month */
324fcf
-	mday = atoi(val);
324fcf
+	mday = atol(val);
324fcf
 
324fcf
 	/* Hour... */
324fcf
 	token = peek_token(&val, NULL, cfile);
324fcf
@@ -1050,7 +1050,7 @@ parse_date_core(cfile)
324fcf
 		return((TIME)0);
324fcf
 	}
324fcf
 	skip_token(&val, NULL, cfile); /* consume hour */
324fcf
-	hour = atoi(val);
324fcf
+	hour = atol(val);
324fcf
 
324fcf
 	/* Colon separating hour from minute... */
324fcf
 	token = peek_token(&val, NULL, cfile);
324fcf
@@ -1072,7 +1072,7 @@ parse_date_core(cfile)
324fcf
 		return((TIME)0);
324fcf
 	}
324fcf
 	skip_token(&val, NULL, cfile); /* consume minute */
324fcf
-	min = atoi(val);
324fcf
+	min = atol(val);
324fcf
 
324fcf
 	/* Colon separating minute from second... */
324fcf
 	token = peek_token(&val, NULL, cfile);
324fcf
@@ -1094,13 +1094,13 @@ parse_date_core(cfile)
324fcf
 		return((TIME)0);
324fcf
 	}
324fcf
 	skip_token(&val, NULL, cfile); /* consume second */
324fcf
-	sec = atoi(val);
324fcf
+	sec = atol(val);
324fcf
 
324fcf
 	tzoff = 0;
324fcf
 	token = peek_token(&val, NULL, cfile);
324fcf
 	if (token == NUMBER) {
324fcf
 		skip_token(&val, NULL, cfile); /* consume tzoff */
324fcf
-		tzoff = atoi(val);
324fcf
+		tzoff = atol(val);
324fcf
 	} else if (token != SEMI) {
324fcf
 		skip_token(&val, NULL, cfile);
324fcf
 		parse_warn(cfile,