1 diff -up dhcp-4.2.1b1/common/dispatch.c.64-bit_lease_parse dhcp-4.2.1b1/common/dispatch.c
2 diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/parse.c
3 --- dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse 2010-12-30 00:01:42.000000000 +0100
4 +++ dhcp-4.2.1b1/common/parse.c 2011-01-28 08:01:10.000000000 +0100
5 @@ -909,8 +909,8 @@ TIME
10 - int tzoff, wday, year, mon, mday, hour, min, sec;
12 + long int tzoff, wday, year, mon, mday, hour, min, sec;
14 enum dhcp_token token;
15 static int months[11] = { 31, 59, 90, 120, 151, 181,
16 @@ -936,7 +936,7 @@ parse_date_core(cfile)
19 token = next_token(&val, NULL, cfile); /* consume number */
25 @@ -948,7 +948,7 @@ parse_date_core(cfile)
28 token = next_token(&val, NULL, cfile); /* consume day of week */
33 token = peek_token(&val, NULL, cfile);
34 @@ -964,7 +964,7 @@ parse_date_core(cfile)
35 somebody invents a time machine, I think we can safely disregard
36 it. This actually works around a stupid Y2K bug that was present
37 in a very early beta release of dhcpd. */
43 @@ -988,7 +988,7 @@ parse_date_core(cfile)
46 token = next_token(&val, NULL, cfile); /* consume month */
47 - mon = atoi(val) - 1;
48 + mon = atol(val) - 1;
50 /* Slash separating month from day... */
51 token = peek_token(&val, NULL, cfile);
52 @@ -1010,7 +1010,7 @@ parse_date_core(cfile)
55 token = next_token(&val, NULL, cfile); /* consume day of month */
60 token = peek_token(&val, NULL, cfile);
61 @@ -1021,7 +1021,7 @@ parse_date_core(cfile)
64 token = next_token(&val, NULL, cfile); /* consume hour */
68 /* Colon separating hour from minute... */
69 token = peek_token(&val, NULL, cfile);
70 @@ -1043,7 +1043,7 @@ parse_date_core(cfile)
73 token = next_token(&val, NULL, cfile); /* consume minute */
77 /* Colon separating minute from second... */
78 token = peek_token(&val, NULL, cfile);
79 @@ -1065,13 +1065,13 @@ parse_date_core(cfile)
82 token = next_token(&val, NULL, cfile); /* consume second */
87 token = peek_token(&val, NULL, cfile);
88 if (token == NUMBER) {
89 token = next_token(&val, NULL, cfile); /* consume tzoff */
92 } else if (token != SEMI) {
93 token = next_token(&val, NULL, cfile);