45c0371
diff -up dhcp-4.2.1b1/common/dispatch.c.64-bit_lease_parse dhcp-4.2.1b1/common/dispatch.c
45c0371
diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/parse.c
45c0371
--- dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse	2010-12-30 00:01:42.000000000 +0100
45c0371
+++ dhcp-4.2.1b1/common/parse.c	2011-01-28 08:01:10.000000000 +0100
45c0371
@@ -909,8 +909,8 @@ TIME 
45c0371
 parse_date_core(cfile)
45c0371
 	struct parse *cfile;
45c0371
 {
45c0371
-	int guess;
45c0371
-	int tzoff, wday, year, mon, mday, hour, min, sec;
45c0371
+	TIME guess;
45c0371
+	long int tzoff, wday, 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,
45c0371
@@ -936,7 +936,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
 	}
45c0371
@@ -948,7 +948,7 @@ parse_date_core(cfile)
45c0371
 		return((TIME)0);
45c0371
 	}
45c0371
 	token = next_token(&val, NULL, cfile); /* consume day of week */
45c0371
-	wday = atoi(val);
45c0371
+	wday = atol(val);
45c0371
 
45c0371
 	/* Year... */
45c0371
 	token = peek_token(&val, NULL, cfile);
45c0371
@@ -964,7 +964,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
 
45c0371
@@ -988,7 +988,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);
45c0371
@@ -1010,7 +1010,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);
45c0371
@@ -1021,7 +1021,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);
45c0371
@@ -1043,7 +1043,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);
45c0371
@@ -1065,13 +1065,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,