MT#63317 fix off by one

Change-Id: I4fa5b6819e55e6cc42a6fbe9f0db8ffa2e7b384d
Warned-by: Coverity
rfuchs/2010
Richard Fuchs 7 months ago
parent b018e64463
commit 15a71f4070

@ -3593,8 +3593,8 @@ static void monologue_bundle_mid(struct call_monologue *ml) {
"%u/'" STR_FORMAT "'), removing it in favour of MID",
ext->id, ext_exist->id, STR_FMT(&ext_exist->name));
t_hash_table_remove(media->extmap_ht, GUINT_TO_POINTER(ext_exist->id));
if (ext_exist->id <= 14)
media->extmap_a[ext_exist->id] = NULL;
if (ext_exist->id > 0 && ext_exist->id <= 14)
media->extmap_a[ext_exist->id - 1] = NULL;
t_queue_remove(&media->extmap, ext_exist); // XXX also not ideal
rtp_extension_free(ext_exist);
}

Loading…
Cancel
Save