From adb2b58b61457df1791ce1ed9b7bb75707d809fb Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sat, 18 Mar 2023 17:23:46 +0200 Subject: Fix a crash if a message subnode is not found in a carbon Fixes #1392 --- xmpp-vala/src/module/xep/0280_message_carbons.vala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xmpp-vala/src') diff --git a/xmpp-vala/src/module/xep/0280_message_carbons.vala b/xmpp-vala/src/module/xep/0280_message_carbons.vala index 5b2dcb78..f7863188 100644 --- a/xmpp-vala/src/module/xep/0280_message_carbons.vala +++ b/xmpp-vala/src/module/xep/0280_message_carbons.vala @@ -58,6 +58,10 @@ public class ReceivedPipelineListener : StanzaListener { warning("Received alleged carbon message from %s, ignoring", message.from.to_string()); return true; } + if (message_node == null) { + warning("Received a carbon message with no message subnode in jabber:client namespace from %s, ignoring", message.from.to_string()); + return true; + } if (received_node != null) { message.add_flag(new MessageFlag(MessageFlag.TYPE_RECEIVED)); } else if (sent_node != null) { -- cgit v1.2.3-70-g09d2