1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

message: make _handle_groupchat safer

This commit is contained in:
Michael Vetter 2021-03-25 15:36:17 +01:00
parent ca9c946ddc
commit 2236242407

View File

@ -990,7 +990,13 @@ _handle_groupchat(xmpp_stanza_t* const stanza)
xmpp_ctx_t* ctx = connection_get_ctx();
const char* room_jid = xmpp_stanza_get_from(stanza);
if(!room_jid) {
return;
}
Jid* from_jid = jid_create(room_jid);
if(!from_jid) {
return;
}
// handle room subject
xmpp_stanza_t* subject = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_SUBJECT);