From 517595abfbad446c0b2b0b0b7bd55939d8bd2412 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 18 Aug 2025 08:08:20 -0400 Subject: [PATCH] MT#55283 fix possible null dereference closes ##1990 Change-Id: I57aaed9f5c73a1cf9833360f147c61248652784d (cherry picked from commit 48ce74f794753d81fe5086340346a3b10c59ed64) --- daemon/codec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index a404854c8..9af50e5b4 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -3874,9 +3874,10 @@ static void __dtx_send_later(struct codec_timer *ct) { dtxb->head_ts += dtxb->tspp; ts = dtxb->head_ts; } + ps = mp_copy.stream; - struct call_media *media = ps->media; - struct ssrc_entry_call *se = call_get_first_ssrc(&media->ssrc_hash_in); + struct call_media *media = ps ? ps->media : NULL; + struct ssrc_entry_call *se = media ? call_get_first_ssrc(&media->ssrc_hash_in) : NULL; log_info_stream_fd(mp_copy.sfd); // copy out other fields so we can unlock