Skip to content

Commit

Permalink
topoh: safety checks for couple of mandatory headers
Browse files Browse the repository at this point in the history
- first via and call-id
- GH #1735

(cherry picked from commit 97da6b1)
  • Loading branch information
miconda committed Nov 23, 2018
1 parent 7dbeb45 commit 01828ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/topoh/topoh_mod.c
Expand Up @@ -286,6 +286,12 @@ int th_prepare_msg(sip_msg_t *msg)
return 3;
}

if(msg->via1==NULL || msg->callid==NULL) {
LM_ERR("mandatory headers missing - via1: %p callid: %p\n",
msg->via1, msg->callid);
return 4;
}

return 0;
}

Expand Down

0 comments on commit 01828ec

Please sign in to comment.