]> 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:18:41 +0000 (14:18 +0000)
commit3ca2bb5e84d245dddc8a5e1f3480b0affeaf05b2
tree0c4a558f8fce1aea9cc9cd96a723418d6cffa587
parentf72d97b7b108a7db7dec9e0e38cdc854fd1a91dc
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 adcfbcd50ea1b05580b3a6ee4c7ffbd09411ebb0)
channels/pjsip/cli_commands.c
main/rtp_engine.c