]> git.pond.sub.org Git - empserver/commitdiff
(emp_config): Buffers passed to parse() were too small. econfig file
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 13 Jun 2005 09:18:14 +0000 (09:18 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 13 Jun 2005 09:18:14 +0000 (09:18 +0000)
could overrun them.  Closes #899546.

src/lib/gen/emp_config.c

index 5f6e77f0416ca7584ab243110d8629e578abbe75..e277fbec05ee33d06b672647d9082fedd350cb2e 100644 (file)
@@ -80,8 +80,8 @@ emp_config(char *file)
 {
     FILE *fp;
     char scanspace[1024];
-    char *av[65];
-    char buf[BUFSIZ];
+    char *av[128];
+    char buf[1024];
     struct keymatch *kp;
     int lno = 0;
     int errors = 0;
@@ -103,7 +103,7 @@ emp_config(char *file)
        for (i = 0; buf[i] && isspace(buf[i]); ++i) ;
        if (!buf[i] || buf[i] == '#')
            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);
            errors = 1;
            continue;