diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-03-25 15:36:17 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-03-25 15:36:17 +0100 |
commit | 22362424074db089e07bf823c9bbd5d54eed55ed (patch) | |
tree | 5d611bd7ce7344fb7c759b6db774cf18536048c3 /src | |
parent | ca9c946ddc1fa9c57c8ec3b091ad54c5a9986d8f (diff) | |
download | profani-tty-22362424074db089e07bf823c9bbd5d54eed55ed.tar.gz |
message: make _handle_groupchat safer
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 55059c74..3cb56c96 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -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); |