45c037
diff -up dhcp-4.2.1b1/common/dispatch.c.64-bit_lease_parse dhcp-4.2.1b1/common/dispatch.c
45c037
diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/parse.c
45c037
--- dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse	2010-12-30 00:01:42.000000000 +0100
45c037
+++ dhcp-4.2.1b1/common/parse.c	2011-01-28 08:01:10.000000000 +0100
45c037
@@ -909,8 +909,8 @@ TIME 
45c037
 parse_date_core(cfile)
45c037
 	struct parse *cfile;
45c037
 {
45c037
-	int guess;
45c037
-	int tzoff, wday, year, mon, mday, hour, min, sec;
45c037
+	TIME guess;
45c037
+	long int tzoff, wday, year, mon, mday, hour, min, sec;
45c037
 	const char *val;
45c037
 	enum dhcp_token token;
45c037
 	static int months[11] = { 31, 59, 90, 120, 151, 181,
45c037
@@ -936,7 +936,7 @@ parse_date_core(cfile)
45c037
 		}
45c037
 
45c037
 		token = next_token(&val, NULL, cfile); /* consume number */
45c037
-		guess = atoi(val);
45c037
+		guess = atol(val);
45c037
 
45c037
 		return((TIME)guess);
45c037
 	}
45c037
@@ -948,7 +948,7 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume day of week */
45c037
-	wday = atoi(val);
45c037
+	wday = atol(val);
45c037
 
45c037
 	/* Year... */
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
@@ -964,7 +964,7 @@ parse_date_core(cfile)
45c037
 	   somebody invents a time machine, I think we can safely disregard
45c037
 	   it.   This actually works around a stupid Y2K bug that was present
45c037
 	   in a very early beta release of dhcpd. */
45c037
-	year = atoi(val);
45c037
+	year = atol(val);
45c037
 	if (year > 1900)
45c037
 		year -= 1900;
45c037
 
45c037
@@ -988,7 +988,7 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume month */	
45c037
-	mon = atoi(val) - 1;
45c037
+	mon = atol(val) - 1;
45c037
 
45c037
 	/* Slash separating month from day... */
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
@@ -1010,7 +1010,7 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume day of month */
45c037
-	mday = atoi(val);
45c037
+	mday = atol(val);
45c037
 
45c037
 	/* Hour... */
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
@@ -1021,7 +1021,7 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume hour */
45c037
-	hour = atoi(val);
45c037
+	hour = atol(val);
45c037
 
45c037
 	/* Colon separating hour from minute... */
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
@@ -1043,7 +1043,7 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume minute */
45c037
-	min = atoi(val);
45c037
+	min = atol(val);
45c037
 
45c037
 	/* Colon separating minute from second... */
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
@@ -1065,13 +1065,13 @@ parse_date_core(cfile)
45c037
 		return((TIME)0);
45c037
 	}
45c037
 	token = next_token(&val, NULL, cfile); /* consume second */
45c037
-	sec = atoi(val);
45c037
+	sec = atol(val);
45c037
 
45c037
 	tzoff = 0;
45c037
 	token = peek_token(&val, NULL, cfile);
45c037
 	if (token == NUMBER) {
45c037
 		token = next_token(&val, NULL, cfile); /* consume tzoff */
45c037
-		tzoff = atoi(val);
45c037
+		tzoff = atol(val);
45c037
 	} else if (token != SEMI) {
45c037
 		token = next_token(&val, NULL, cfile);
45c037
 		parse_warn(cfile,