mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
fixed null pointer dereference in /join command
Command /join @/ leads to crash because jid_create("@/") returns NULL
This commit is contained in:
parent
c73d181690
commit
71f4194513
@ -2673,10 +2673,15 @@ _cmd_join(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Jid *room_arg = jid_create(args[0]);
|
||||
if (room_arg == NULL) {
|
||||
cons_show_error("Specified room has incorrect format");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int num_args = g_strv_length(args);
|
||||
char *room = NULL;
|
||||
char *nick = NULL;
|
||||
Jid *room_arg = jid_create(args[0]);
|
||||
GString *room_str = g_string_new("");
|
||||
Jid *my_jid = jid_create(jabber_get_fulljid());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user