File unbound-1.0.0-buffer_overflow.patch of Package unbound

--- unbound-1.0.0/smallapp/unbound-checkconf.c.orig	2008-04-24 14:37:01.000000000 +0200
+++ unbound-1.0.0/smallapp/unbound-checkconf.c	2008-05-26 20:43:14.000000000 +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);
openSUSE Build Service is sponsored by