Skip to content

Commit

Permalink
mid_registrar: Add paranoid safety check
Browse files Browse the repository at this point in the history
This extra check doesn't fix anything right now, but at least it makes
Coverity happy.

CID #200020

(cherry picked from commit 2e60b50)
  • Loading branch information
liviuchircu committed Jul 17, 2020
1 parent 42b71cf commit 85464ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/mid_registrar/save.c
Expand Up @@ -302,7 +302,10 @@ static int overwrite_req_contacts(struct sip_msg *req,
adv_port = _get_adv_port(send_sock, req);

c = get_first_contact(req);
list_for_each(_, &mri->ct_mappings) {
list_for_each (_, &mri->ct_mappings) {
if (!c)
break;

ctmap = list_entry(_, struct ct_mapping, list);

/* if uri string points outside the original msg buffer, it means
Expand Down

0 comments on commit 85464ef

Please sign in to comment.