mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fix segfault in /cmd exec
Test for correct number of arguments before using argument.
This commit is contained in:
parent
ad41959cc6
commit
04988ab4ba
@ -7818,6 +7818,11 @@ cmd_command_exec(ProfWin *window, const char *const command, gchar **args)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args[1] == NULL) {
|
||||||
|
cons_bad_cmd_usage(command);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
char *jid = args[2];
|
char *jid = args[2];
|
||||||
if (jid == NULL) {
|
if (jid == NULL) {
|
||||||
switch (window->type) {
|
switch (window->type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user