Commit ec73dece authored by Rusty Russell's avatar Rusty Russell

ccanlint: don't crash if given bad directory name.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent a0fd3905
......@@ -681,6 +681,9 @@ int main(int argc, char *argv[])
for (i = 1; i < argc; i++) {
dir = path_canon(NULL,
take(path_join(NULL, cwd, argv[i])));
if (!dir)
err(1, "Cannot get canonical name of '%s'",
argv[i]);
prefix = path_join(NULL, ccan_dir, "ccan");
prefix = path_rel(NULL, take(prefix), dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment