From 20e4d108d49f736e639d68b86999ce396d844cb3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 5 Oct 2021 15:43:05 +0200 Subject: [PATCH] fixed regression of not handling jingle content map parsing failures --- .../conversations/xmpp/jingle/JingleRtpConnection.java | 7 ++++++- .../eu/siacs/conversations/xmpp/jingle/RtpContentMap.java | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java index 6afcff336..8c4d14843 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -314,7 +314,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web } private ListenableFuture receiveRtpContentMap(final JinglePacket jinglePacket, final boolean expectVerification) { - final RtpContentMap receivedContentMap = RtpContentMap.of(jinglePacket); + final RtpContentMap receivedContentMap; + try { + receivedContentMap = RtpContentMap.of(jinglePacket); + } catch (final Exception e) { + return Futures.immediateFailedFuture(e); + } if (receivedContentMap instanceof OmemoVerifiedRtpContentMap) { final ListenableFuture> future = id.account.getAxolotlService().decrypt((OmemoVerifiedRtpContentMap) receivedContentMap, id.with); return Futures.transform(future, omemoVerifiedPayload -> { diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java index 3e02cc29b..9baffcf81 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java @@ -159,7 +159,6 @@ public class RtpContentMap { } else if (description instanceof RtpDescription) { rtpDescription = (RtpDescription) description; } else { - Log.d(Config.LOGTAG, "description was " + description); throw new UnsupportedApplicationException("Content does not contain rtp description"); } if (transportInfo instanceof IceUdpTransportInfo) {