Blame SOURCES/dhcp-4.2.4-64_bit_lease_parse.patch

45d60a
diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c
45d60a
--- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse	2012-03-09 12:28:10.000000000 +0100
45d60a
+++ dhcp-4.2.4b1/common/parse.c	2012-04-16 17:30:55.867045149 +0200
45d60a
@@ -906,8 +906,8 @@ TIME
45d60a
 parse_date_core(cfile)
45d60a
 	struct parse *cfile;
45d60a
 {
45d60a
-	int guess;
45d60a
-	int tzoff, year, mon, mday, hour, min, sec;
45d60a
+	TIME guess;
45d60a
+	long int tzoff, year, mon, mday, hour, min, sec;
45d60a
 	const char *val;
45d60a
 	enum dhcp_token token;
45d60a
 	static int months[11] = { 31, 59, 90, 120, 151, 181,
45d60a
@@ -933,7 +933,7 @@ parse_date_core(cfile)
45d60a
 		}
45d60a
 
45d60a
 		token = next_token(&val, NULL, cfile); /* consume number */
45d60a
-		guess = atoi(val);
45d60a
+		guess = atol(val);
45d60a
 
45d60a
 		return((TIME)guess);
45d60a
 	}
45d60a
@@ -961,7 +961,7 @@ parse_date_core(cfile)
45d60a
 	   somebody invents a time machine, I think we can safely disregard
45d60a
 	   it.   This actually works around a stupid Y2K bug that was present
45d60a
 	   in a very early beta release of dhcpd. */
45d60a
-	year = atoi(val);
45d60a
+	year = atol(val);
45d60a
 	if (year > 1900)
45d60a
 		year -= 1900;
45d60a
 
45d60a
@@ -985,7 +985,7 @@ parse_date_core(cfile)
45d60a
 		return((TIME)0);
45d60a
 	}
45d60a
 	token = next_token(&val, NULL, cfile); /* consume month */	
45d60a
-	mon = atoi(val) - 1;
45d60a
+	mon = atol(val) - 1;
45d60a
 
45d60a
 	/* Slash separating month from day... */
45d60a
 	token = peek_token(&val, NULL, cfile);
45d60a
@@ -1007,7 +1007,7 @@ parse_date_core(cfile)
45d60a
 		return((TIME)0);
45d60a
 	}
45d60a
 	token = next_token(&val, NULL, cfile); /* consume day of month */
45d60a
-	mday = atoi(val);
45d60a
+	mday = atol(val);
45d60a
 
45d60a
 	/* Hour... */
45d60a
 	token = peek_token(&val, NULL, cfile);
45d60a
@@ -1018,7 +1018,7 @@ parse_date_core(cfile)
45d60a
 		return((TIME)0);
45d60a
 	}
45d60a
 	token = next_token(&val, NULL, cfile); /* consume hour */
45d60a
-	hour = atoi(val);
45d60a
+	hour = atol(val);
45d60a
 
45d60a
 	/* Colon separating hour from minute... */
45d60a
 	token = peek_token(&val, NULL, cfile);
45d60a
@@ -1040,7 +1040,7 @@ parse_date_core(cfile)
45d60a
 		return((TIME)0);
45d60a
 	}
45d60a
 	token = next_token(&val, NULL, cfile); /* consume minute */
45d60a
-	min = atoi(val);
45d60a
+	min = atol(val);
45d60a
 
45d60a
 	/* Colon separating minute from second... */
45d60a
 	token = peek_token(&val, NULL, cfile);
45d60a
@@ -1062,13 +1062,13 @@ parse_date_core(cfile)
45d60a
 		return((TIME)0);
45d60a
 	}
45d60a
 	token = next_token(&val, NULL, cfile); /* consume second */
45d60a
-	sec = atoi(val);
45d60a
+	sec = atol(val);
45d60a
 
45d60a
 	tzoff = 0;
45d60a
 	token = peek_token(&val, NULL, cfile);
45d60a
 	if (token == NUMBER) {
45d60a
 		token = next_token(&val, NULL, cfile); /* consume tzoff */
45d60a
-		tzoff = atoi(val);
45d60a
+		tzoff = atol(val);
45d60a
 	} else if (token != SEMI) {
45d60a
 		token = next_token(&val, NULL, cfile);
45d60a
 		parse_warn(cfile,