diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-18 17:23:46 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2023-03-21 17:57:56 -0600 |
commit | adb2b58b61457df1791ce1ed9b7bb75707d809fb (patch) | |
tree | 9f3d1b52be2b201e192cdbe02719e2a9697bc74a /xmpp-vala | |
parent | 444275a99d659337bc808e5d6b75fc0ae40de499 (diff) | |
download | dino-adb2b58b61457df1791ce1ed9b7bb75707d809fb.tar.gz dino-adb2b58b61457df1791ce1ed9b7bb75707d809fb.zip |
Fix a crash if a message subnode is not found in a carbon
Fixes #1392
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0280_message_carbons.vala | 4 |
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) { |