Commit Diff


commit - da39935df3ff8a2d8cfc080ddf69352220d6de73
commit + 18223c2807bc7cc41327d84c187934fd2730d277
blob - 2036dbf365e7a070da18f97ac5d6900620e005d6
blob + d72565ca77eed2dc3b62cb83bd3cdf0883b70e37
--- ctl.c
+++ ctl.c
@@ -203,6 +203,7 @@ load_files(struct parse_result *res, int *ret)
 		} else if (!strncmp(file, "  ", 2))
 			file += 2;
 
+		memset(path, 0, sizeof(path));
 		if (canonpath(file, path, sizeof(path)) == -1) {
 			log_warnx("canonpath %s", file);
 			continue;
@@ -320,6 +321,7 @@ ctlaction(struct parse_result *res)
 	case ADD:
 		done = 0;
 		for (i = 0; res->files[i] != NULL; ++i) {
+			memset(path, 0, sizeof(path));
 			if (canonpath(res->files[i], path, sizeof(path))
 			    == -1) {
 				log_warn("canonpath %s", res->files[i]);