14 lines
636 B
Diff
14 lines
636 B
Diff
Index: smallapp/unbound-checkconf.c
|
|
===================================================================
|
|
--- smallapp/unbound-checkconf.c.orig 2008-04-24 14:37:01.000000000 +0200
|
|
+++ smallapp/unbound-checkconf.c 2008-05-21 22:15:10.695878674 +0200
|
|
@@ -329,7 +329,7 @@ morechecks(struct config_file* cfg, char
|
|
fatal_exit("getcwd: %s", strerror(errno));
|
|
strncat(buf, "/", sizeof(buf));
|
|
}
|
|
- strncat(buf, fname, sizeof(buf));
|
|
+ strncat(buf, fname, (sizeof(buf)-strlen(buf)-1));
|
|
if(strncmp(buf, cfg->chrootdir, strlen(cfg->chrootdir)) != 0)
|
|
fatal_exit("config file %s is not inside chroot %s",
|
|
buf, cfg->chrootdir);
|