diff options
author | netblue30 <netblue30@yahoo.com> | 2019-03-10 10:24:13 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2019-03-10 10:24:13 -0400 |
commit | 9101f3118b8023403b19a083683c67d6f90ee41e (patch) | |
tree | 8d625f49c092d826406711d65618d7e56db9f206 /src | |
parent | Merge pull request #2431 from smitsohu/start-tor (diff) | |
download | firejail-9101f3118b8023403b19a083683c67d6f90ee41e.tar.gz firejail-9101f3118b8023403b19a083683c67d6f90ee41e.tar.zst firejail-9101f3118b8023403b19a083683c67d6f90ee41e.zip |
checking for invalid chars in profile filename before any other processing
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index e186002af..461cba26a 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1522,6 +1522,9 @@ int main(int argc, char **argv) { | |||
1522 | if (!ppath) | 1522 | if (!ppath) |
1523 | errExit("strdup"); | 1523 | errExit("strdup"); |
1524 | 1524 | ||
1525 | // checking for strange chars in the file name, no globbing | ||
1526 | invalid_filename(ppath, 0); | ||
1527 | |||
1525 | if (*ppath == ':' || access(ppath, R_OK) || is_dir(ppath)) { | 1528 | if (*ppath == ':' || access(ppath, R_OK) || is_dir(ppath)) { |
1526 | int has_colon = (*ppath == ':'); | 1529 | int has_colon = (*ppath == ':'); |
1527 | char *ptr = ppath; | 1530 | char *ptr = ppath; |