F-3210 - Null-check command allocation in client argument parsing

pull/1073/head
aidan garske 2026-07-10 12:07:19 -07:00 committed by John Safranek
parent aa7b268376
commit 404b5130cf
1 changed files with 4 additions and 0 deletions

View File

@ -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;