about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-03-25 15:03:35 +0100
committerMichael Vetter <jubalh@iodoru.org>2021-03-25 15:03:35 +0100
commitee87e5b036bc558844ab9796a2f94b78b7c40fc0 (patch)
tree78c6d268b99e5bdfe470d30fef1a7280fefec707 /src
parentd2dc440535c24c16a0dac054ebe4f063d69ada46 (diff)
downloadprofani-tty-ee87e5b036bc558844ab9796a2f94b78b7c40fc0.tar.gz
message: make _handle_muc_private_message safer
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 80a4850d..68f752c4 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -1193,7 +1193,14 @@ _handle_muc_private_message(xmpp_stanza_t* const stanza)
     message->type = PROF_MSG_TYPE_MUCPM;
 
     const gchar* from = xmpp_stanza_get_from(stanza);
+    if (!from) {
+        goto out;
+    }
+
     message->from_jid = jid_create(from);
+    if (!message->from_jid) {
+        goto out;
+    }
 
     // message stanza id
     const char* id = xmpp_stanza_get_id(stanza);