(emp_config): Buffers passed to parse() were too small. econfig file

could overrun them.  Closes #899546.
This commit is contained in:
Markus Armbruster 2005-06-13 09:18:14 +00:00
parent 2f35354097
commit 9ee7a02be8

View file

@ -80,8 +80,8 @@ emp_config(char *file)
{ {
FILE *fp; FILE *fp;
char scanspace[1024]; char scanspace[1024];
char *av[65]; char *av[128];
char buf[BUFSIZ]; char buf[1024];
struct keymatch *kp; struct keymatch *kp;
int lno = 0; int lno = 0;
int errors = 0; int errors = 0;
@ -103,7 +103,7 @@ emp_config(char *file)
for (i = 0; buf[i] && isspace(buf[i]); ++i) ; for (i = 0; buf[i] && isspace(buf[i]); ++i) ;
if (!buf[i] || buf[i] == '#') if (!buf[i] || buf[i] == '#')
continue; continue;
if (parse(buf, av, 0, scanspace, 0) < 0) { if (parse(buf, av, NULL, scanspace, NULL) < 0) {
fprintf(stderr, "%s:%d: Can't parse line %s", file, lno, buf); fprintf(stderr, "%s:%d: Can't parse line %s", file, lno, buf);
errors = 1; errors = 1;
continue; continue;