From 96e596398bcd2280f39c6cb8d3a07f9d46b6fe50 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 18 Feb 2026 10:59:54 -0400 Subject: [PATCH] MT#55283 allow null media_id Change-Id: I2715fcf1a05c430c7eeea5c4c8f8ad7c1bc69ed0 (cherry picked from commit ba8c0fa87f4a0959b7b1657fd55e036f1d8a7a11) --- daemon/call.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 237ff0c1f..0b9b1196b 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -708,14 +708,15 @@ struct call_media *call_media_new(call_t *call) { return med; } -__attribute__((nonnull(1, 2, 4))) +__attribute__((nonnull(1, 2))) static struct call_media *call_get_media(struct call_monologue *ml, const str *type, enum media_type type_id, const str *media_id, bool trickle_ice, unsigned int want_index, str_ht tracker) { struct call_media *med; call_t *call; - if (media_id->len && (!t_hash_table_is_set(tracker) || !t_hash_table_lookup(tracker, media_id))) { + if (media_id && media_id->len + && (!t_hash_table_is_set(tracker) || !t_hash_table_lookup(tracker, media_id))) { if (t_hash_table_is_set(tracker)) t_hash_table_insert(tracker, (str *) media_id, (str *) media_id); // in this case, the media sections can be out of order and the media ID