From 4113b3f642f6c8059b20d494ea8affdea3201432 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 24 Jan 2017 13:37:28 +0000 Subject: [PATCH] Check barejid in carbons --- src/xmpp/message.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 3f8ad5a0..d78e891f 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -716,8 +716,7 @@ _handle_carbons(xmpp_stanza_t *const stanza) Jid *my_jid = jid_create(connection_get_fulljid()); const char *const stanza_from = xmpp_stanza_get_from(stanza); - Jid *msg_jid = jid_create(stanza_from); - if (g_strcmp0(my_jid->barejid, msg_jid->barejid) != 0) { + if (g_strcmp0(my_jid->barejid, stanza_from) != 0) { log_warning("Invalid carbon received, from: %s", stanza_from); return TRUE; }