1 diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c
2 --- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse 2012-03-09 12:28:10.000000000 +0100
3 +++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:30:55.867045149 +0200
4 @@ -906,8 +906,8 @@ TIME
9 - int tzoff, year, mon, mday, hour, min, sec;
11 + long int tzoff, year, mon, mday, hour, min, sec;
13 enum dhcp_token token;
14 static int months[11] = { 31, 59, 90, 120, 151, 181,
15 @@ -933,7 +933,7 @@ parse_date_core(cfile)
18 token = next_token(&val, NULL, cfile); /* consume number */
24 @@ -961,7 +961,7 @@ parse_date_core(cfile)
25 somebody invents a time machine, I think we can safely disregard
26 it. This actually works around a stupid Y2K bug that was present
27 in a very early beta release of dhcpd. */
33 @@ -985,7 +985,7 @@ parse_date_core(cfile)
36 token = next_token(&val, NULL, cfile); /* consume month */
37 - mon = atoi(val) - 1;
38 + mon = atol(val) - 1;
40 /* Slash separating month from day... */
41 token = peek_token(&val, NULL, cfile);
42 @@ -1007,7 +1007,7 @@ parse_date_core(cfile)
45 token = next_token(&val, NULL, cfile); /* consume day of month */
50 token = peek_token(&val, NULL, cfile);
51 @@ -1018,7 +1018,7 @@ parse_date_core(cfile)
54 token = next_token(&val, NULL, cfile); /* consume hour */
58 /* Colon separating hour from minute... */
59 token = peek_token(&val, NULL, cfile);
60 @@ -1040,7 +1040,7 @@ parse_date_core(cfile)
63 token = next_token(&val, NULL, cfile); /* consume minute */
67 /* Colon separating minute from second... */
68 token = peek_token(&val, NULL, cfile);
69 @@ -1062,13 +1062,13 @@ parse_date_core(cfile)
72 token = next_token(&val, NULL, cfile); /* consume second */
77 token = peek_token(&val, NULL, cfile);
78 if (token == NUMBER) {
79 token = next_token(&val, NULL, cfile); /* consume tzoff */
82 } else if (token != SEMI) {
83 token = next_token(&val, NULL, cfile);