mirror of https://github.com/wolfSSL/wolfssh.git
F-3210 - Null-check command allocation in client argument parsing
parent
aa7b268376
commit
404b5130cf
|
|
@ -857,6 +857,10 @@ static int config_parse_command_line(struct config* config,
|
|||
}
|
||||
|
||||
command = (char*)WMALLOC(commandSz, NULL, 0);
|
||||
if (command == NULL) {
|
||||
fprintf(stderr, "Couldn't capture the command.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
config->command = command;
|
||||
cursor = command;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue