From 8a6d256fc1593e987d0e0b8098008388ceba5694 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 25 Mar 2021 15:07:09 +0100 Subject: [PATCH] message: make _handle_chat safer --- src/xmpp/message.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 68f752c4..cb7056a1 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -1290,6 +1290,9 @@ _handle_chat(xmpp_stanza_t* const stanza, gboolean is_mam, gboolean is_carbon, c return; } Jid* jid = jid_create(from); + if (!jid) { + return; + } // private message from chat room use full jid (room/nick) if (muc_active(jid->barejid)) {