mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 21:06:20 +00:00
Fix segfault in /cmd exec
Test for correct number of arguments before using argument.
This commit is contained in:
@@ -7818,6 +7818,11 @@ cmd_command_exec(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (args[1] == NULL) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char *jid = args[2];
|
||||
if (jid == NULL) {
|
||||
switch (window->type) {
|
||||
|
||||
Reference in New Issue
Block a user