diff options
author | 2016-12-24 06:46:42 +0530 | |
---|---|---|
committer | 2016-12-24 07:01:42 +0530 | |
commit | 93d9d7aece7f5951ccfd106cf5b94636074ece67 (patch) | |
tree | ba7bbeb8fee313bcc959bd78bfbc41b2334f48af /src | |
parent | testing (diff) | |
download | firejail-93d9d7aece7f5951ccfd106cf5b94636074ece67.tar.gz firejail-93d9d7aece7f5951ccfd106cf5b94636074ece67.tar.zst firejail-93d9d7aece7f5951ccfd106cf5b94636074ece67.zip |
argv: private-home: exit on invalid option
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 15820f7dd..f9742cc3f 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1500,6 +1500,10 @@ int main(int argc, char **argv) { | |||
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | // extract private home dirname | 1502 | // extract private home dirname |
1503 | if (*(argv[i] + 15) == '\0') { | ||
1504 | fprintf(stderr, "Error: invalid private-home option\n"); | ||
1505 | exit(1); | ||
1506 | } | ||
1503 | cfg.home_private_keep = argv[i] + 15; | 1507 | cfg.home_private_keep = argv[i] + 15; |
1504 | arg_private = 1; | 1508 | arg_private = 1; |
1505 | } | 1509 | } |