]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip show channelstats: Prevent possible segfault when faxing
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 9 Feb 2024 16:15:13 +0000 (09:15 -0700)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 7 Mar 2024 14:16:38 +0000 (14:16 +0000)
commitf3c3c5720df8afe0923e18dc883c7203b920802d
treec6672a0704f1f52fd6e2b97d3db2f2cc5aaf11fd
parentd9e4b080f2625cee6b431957c39b26e9aad0fd50
pjsip show channelstats: Prevent possible segfault when faxing

Under rare circumstances, it's possible for the original audio
session in the active_media_state default_session to be corrupted
instead of removed when switching to the t38/image media session
during fax negotiation.  This can cause a segfault when a "pjsip
show channelstats" attempts to print that audio media session's
rtp statistics.  In these cases, the active_media_state
topology is correctly showing only a single t38/image stream
so we now check that there's an audio stream in the topology
before attempting to use the audio media session to get the rtp
statistics.

Resolves: #592
(cherry picked from commit 1aaf9e6a1d5ce2b89fe50312aecf01a881206b4f)
channels/pjsip/cli_commands.c
main/rtp_engine.c