Browse Source

MT#56447 fix list pointer check

Check for EOL in the right places.

Change-Id: Ib9b9b1e08c585f3865a1c8ab0146b8a3eb3c7e39
Warned-by: Coverity
pull/1657/head
Richard Fuchs 3 years ago
parent
commit
4e908d8128
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      daemon/call.c

+ 5
- 2
daemon/call.c View File

@ -3436,6 +3436,9 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flag
bool transcoding = false;
for (GList *l = streams->head; l; l = l->next) {
if (!src_ml_it)
return -1;
struct stream_params *sp = l->data;
struct call_subscription *cs = src_ml_it->data;
@ -3446,12 +3449,12 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flag
// the current source ml
if (index > src_ml->medias->len) {
src_ml_it = src_ml_it->next;
if (!src_ml_it)
return -1;
index = 1; // starts over at 1
cs = src_ml_it->data;
src_ml = cs->monologue;
}
if (!src_ml_it)
return -1;
struct call_media *dst_media = __get_media(dst_ml, sp, flags, 0);
struct call_media *src_media = __get_media(src_ml, sp, flags, index++);


Loading…
Cancel
Save