Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > media > main-updates-src > by-pkgid > b6defacb3e45f6c031a053c9af126cf0 > files > 53

vixie-cron-4.1-9.1mdv2007.1.src.rpm

--- vixie-cron-4.1/env.c.crontabhole	2005-11-04 21:13:41.000000000 +0100
+++ vixie-cron-4.1/env.c	2005-11-04 21:23:49.000000000 +0100
@@ -139,8 +139,9 @@
 	filepos = ftell(f);
 	fileline = LineNumber;
 	skip_comments(f);
-	if (EOF == get_string(envstr, MAX_ENVSTR, f, "\n"))
+	if (EOF == get_string(envstr, MAX_ENVSTR - 1, f, "\n"))
 		return (ERR);
+ 	envstr[MAX_ENVSTR - 1] = '\0';
 
 	Debug(DPARS, ("load_env, read <%s>\n", envstr))