message: fix possible segfault in _handle_muc_user

This commit is contained in:
Michael Vetter
2021-03-25 11:38:22 +01:00
parent e656bdb83c
commit f21a99eaf8

View File

@@ -877,6 +877,10 @@ _handle_muc_user(xmpp_stanza_t* const stanza)
xmpp_stanza_t* xns_muc_user = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_MUC_USER);
const char* room = xmpp_stanza_get_from(stanza);
if (!xns_muc_user) {
return;
}
if (!room) {
log_warning("Message received with no from attribute, ignoring");
return;