potential buffer overruns in env_* routines

This commit is contained in:
David van Moolenbroek
2009-05-10 16:54:37 +00:00
parent e08b38a5c4
commit a2485b346c
4 changed files with 13 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ char *key; /* environment variable whose value is bogus */
int s;
if ((s=env_get_param(key, value, sizeof(value))) == 0) {
if (s != ESRCH) /* only error allowed */
printf("WARNING: get_mon_param() failed in env_panic(): %d\n", s);
printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
}
printf("Bad environment setting: '%s = %s'\n", key, value);
panic("","", NO_NUM);