diff options
author | 2017-05-23 21:43:42 +0200 | |
---|---|---|
committer | 2017-05-23 21:44:36 +0200 | |
commit | 4ec84fa66436a6e64bf54edd98f80398e40765cb (patch) | |
tree | b6a25cba5b3a2c12a9622725de20dc4955ec84cb /src | |
parent | fix for #1301 (diff) | |
download | firejail-4ec84fa66436a6e64bf54edd98f80398e40765cb.tar.gz firejail-4ec84fa66436a6e64bf54edd98f80398e40765cb.tar.zst firejail-4ec84fa66436a6e64bf54edd98f80398e40765cb.zip |
minor bugfix: Correctly dereference "subdirname" variable
cppcheck reported:
[firejail/main.c:1335]: (warning) Char literal compared with pointer 'subdirname'. Did you intend to dereference it?
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 012b2f230..95c325f9f 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1332,7 +1332,7 @@ int main(int argc, char **argv) { | |||
1332 | arg_overlay_reuse = 1; | 1332 | arg_overlay_reuse = 1; |
1333 | 1333 | ||
1334 | char *subdirname = argv[i] + 16; | 1334 | char *subdirname = argv[i] + 16; |
1335 | if (subdirname == '\0') { | 1335 | if (*subdirname == '\0') { |
1336 | fprintf(stderr, "Error: invalid overlay option\n"); | 1336 | fprintf(stderr, "Error: invalid overlay option\n"); |
1337 | exit(1); | 1337 | exit(1); |
1338 | } | 1338 | } |