From ff7d2aa686b3b210a23b81bc307c22f207046703 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 9 Jan 2025 14:28:20 -0400 Subject: [PATCH] MT#61822 fix possible NULL dereference Change-Id: Id06c237482d25c6a517208dea29ca1c7542265e6 --- daemon/codec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/codec.c b/daemon/codec.c index 9bb335808..3eb48b108 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -3867,6 +3867,9 @@ static bool __ssrc_handler_decode_common(struct codec_ssrc_handler *ch, struct c static struct ssrc_entry *__ssrc_handler_transcode_new(void *p) { struct codec_handler *h = p; + if (!h->source_pt.codec_def || !h->dest_pt.codec_def) + return NULL; + ilogs(codec, LOG_DEBUG, "Creating SSRC transcoder from %s/%u/%i to " "%s/%u/%i", h->source_pt.codec_def->rtpname, h->source_pt.clock_rate,