mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
client: Check if optarg is different from NULL before dereferencing.
CID 968159
This commit is contained in:
parent
35461db4e9
commit
6aa7a62ee0
@ -145,8 +145,10 @@ static int parse_args(struct argument_s *csync_args, int argc, char **argv)
|
||||
case 0:
|
||||
opt = (struct option*)&(long_options[c]);
|
||||
if(c_streq(opt->name, "exclude-file")) {
|
||||
if (optarg != NULL) {
|
||||
csync_args->exclude_file = c_strdup(optarg);
|
||||
/* printf("Argument: exclude-file: %s\n", csync_args->exclude_file); */
|
||||
}
|
||||
} else if(c_streq(opt->name, "debug-level")) {
|
||||
csync_args->debug_level = atoi(optarg);
|
||||
} else if(c_streq(opt->name, "disable-statedb")) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user