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