Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates-src > by-pkgid > 610cea300eee30e41711bcbcf266bbff > files > 11

dhcp-4.3.3P1-1.mga5.src.rpm

--- dhcp-4.3.0/common/parse.c.64-bit_lease_parse	2014-01-31 14:20:49.000000000 -0500
+++ dhcp-4.3.0/common/parse.c	2014-06-15 11:48:48.559669323 -0400
@@ -932,8 +932,8 @@ TIME
 parse_date_core(cfile)
 	struct parse *cfile;
 {
-	int guess;
-	int tzoff, year, mon, mday, hour, min, sec;
+	TIME guess;
+	long int tzoff, year, mon, mday, hour, min, sec;
 	const char *val;
 	enum dhcp_token token;
 	static int months[11] = { 31, 59, 90, 120, 151, 181,
@@ -959,7 +959,7 @@ parse_date_core(cfile)
 		}
 
 		skip_token(&val, NULL, cfile); /* consume number */
-		guess = atoi(val);
+		guess = atol(val);
 
 		return((TIME)guess);
 	}
@@ -987,7 +987,7 @@ parse_date_core(cfile)
 	   somebody invents a time machine, I think we can safely disregard
 	   it.   This actually works around a stupid Y2K bug that was present
 	   in a very early beta release of dhcpd. */
-	year = atoi(val);
+	year = atol(val);
 	if (year > 1900)
 		year -= 1900;
 
@@ -1011,7 +1011,7 @@ parse_date_core(cfile)
 		return((TIME)0);
 	}
 	skip_token(&val, NULL, cfile); /* consume month */	
-	mon = atoi(val) - 1;
+	mon = atol(val) - 1;
 
 	/* Slash separating month from day... */
 	token = peek_token(&val, NULL, cfile);
@@ -1033,7 +1033,7 @@ parse_date_core(cfile)
 		return((TIME)0);
 	}
 	skip_token(&val, NULL, cfile); /* consume day of month */
-	mday = atoi(val);
+	mday = atol(val);
 
 	/* Hour... */
 	token = peek_token(&val, NULL, cfile);
@@ -1044,7 +1044,7 @@ parse_date_core(cfile)
 		return((TIME)0);
 	}
 	skip_token(&val, NULL, cfile); /* consume hour */
-	hour = atoi(val);
+	hour = atol(val);
 
 	/* Colon separating hour from minute... */
 	token = peek_token(&val, NULL, cfile);
@@ -1066,7 +1066,7 @@ parse_date_core(cfile)
 		return((TIME)0);
 	}
 	skip_token(&val, NULL, cfile); /* consume minute */
-	min = atoi(val);
+	min = atol(val);
 
 	/* Colon separating minute from second... */
 	token = peek_token(&val, NULL, cfile);
@@ -1088,13 +1088,13 @@ parse_date_core(cfile)
 		return((TIME)0);
 	}
 	skip_token(&val, NULL, cfile); /* consume second */
-	sec = atoi(val);
+	sec = atol(val);
 
 	tzoff = 0;
 	token = peek_token(&val, NULL, cfile);
 	if (token == NUMBER) {
 		skip_token(&val, NULL, cfile); /* consume tzoff */
-		tzoff = atoi(val);
+		tzoff = atol(val);
 	} else if (token != SEMI) {
 		skip_token(&val, NULL, cfile);
 		parse_warn(cfile,