diff options
author | 2016-03-12 12:42:41 -0500 | |
---|---|---|
committer | 2016-03-12 12:42:41 -0500 | |
commit | 33a591193edf96846e88778a066fcd497ef75901 (patch) | |
tree | b5f325cc4da65bc53466ded9b67d77444ebe7ff8 /src | |
parent | build fixes (diff) | |
download | firejail-33a591193edf96846e88778a066fcd497ef75901.tar.gz firejail-33a591193edf96846e88778a066fcd497ef75901.tar.zst firejail-33a591193edf96846e88778a066fcd497ef75901.zip |
fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/checkcfg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c index 9313bb1a4..9ac08b1a6 100644 --- a/src/firejail/checkcfg.c +++ b/src/firejail/checkcfg.c | |||
@@ -55,17 +55,21 @@ int checkcfg(int val) { | |||
55 | continue; | 55 | continue; |
56 | 56 | ||
57 | // parse line | 57 | // parse line |
58 | line_remove_spaces(buf); | 58 | char *ptr = line_remove_spaces(buf); |
59 | if (strncmp(buf, "file-transfer ", 14) == 0) { | 59 | if (!ptr) |
60 | if (strcmp(buf + 14, "yes") == 0) | 60 | continue; |
61 | |||
62 | if (strncmp(ptr, "file-transfer ", 14) == 0) { | ||
63 | if (strcmp(ptr + 14, "yes") == 0) | ||
61 | cfg_val[CFG_FILE_TRANSFER] = 1; | 64 | cfg_val[CFG_FILE_TRANSFER] = 1; |
62 | else if (strcmp(buf + 14, "no") == 0) | 65 | else if (strcmp(ptr + 14, "no") == 0) |
63 | cfg_val[CFG_FILE_TRANSFER] = 0; | 66 | cfg_val[CFG_FILE_TRANSFER] = 0; |
64 | else | 67 | else |
65 | goto errout; | 68 | goto errout; |
66 | } | 69 | } |
67 | else | 70 | else |
68 | goto errout; | 71 | goto errout; |
72 | free(ptr); | ||
69 | } | 73 | } |
70 | 74 | ||
71 | fclose(fp); | 75 | fclose(fp); |