aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-03-18 17:23:46 +0200
committerMarvin W <git@larma.de>2023-03-21 17:57:56 -0600
commitadb2b58b61457df1791ce1ed9b7bb75707d809fb (patch)
tree9f3d1b52be2b201e192cdbe02719e2a9697bc74a
parent444275a99d659337bc808e5d6b75fc0ae40de499 (diff)
downloaddino-adb2b58b61457df1791ce1ed9b7bb75707d809fb.tar.gz
dino-adb2b58b61457df1791ce1ed9b7bb75707d809fb.zip
Fix a crash if a message subnode is not found in a carbon
Fixes #1392
-rw-r--r--xmpp-vala/src/module/xep/0280_message_carbons.vala4
1 files changed, 4 insertions, 0 deletions
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<MessageStanza> {
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) {