diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/macros.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/firejail/macros.c b/src/firejail/macros.c index ef64178b5..17ccbdff2 100644 --- a/src/firejail/macros.c +++ b/src/firejail/macros.c | |||
@@ -300,13 +300,14 @@ void invalid_filename(const char *fname, int globbing) { | |||
300 | size_t i = 0; | 300 | size_t i = 0; |
301 | while (ptr[i] != '\0') { | 301 | while (ptr[i] != '\0') { |
302 | if (iscntrl((unsigned char) ptr[i])) { | 302 | if (iscntrl((unsigned char) ptr[i])) { |
303 | fprintf(stderr, "Error: \"%s\" is an invalid filename: no control characters allowed\n", | 303 | char *msg = fix_control_chars(fname); |
304 | fix_control_chars(fname)); | 304 | fprintf(stderr, "Error: \"%s\" is an invalid filename: no control characters allowed\n", msg); |
305 | free(msg); | ||
305 | exit(1); | 306 | exit(1); |
306 | } | 307 | } |
307 | i++; | 308 | i++; |
308 | } | 309 | } |
309 | 310 | ||
310 | char *reject; | 311 | char *reject; |
311 | if (globbing) | 312 | if (globbing) |
312 | reject = "\\&!\"'<>%^{};,"; // file globbing ('*?[]') is allowed | 313 | reject = "\\&!\"'<>%^{};,"; // file globbing ('*?[]') is allowed |