Skip to content

Commit

Permalink
Merge pull request #1430 from italorossi/master
Browse files Browse the repository at this point in the history
mid_registrar: Fix segfault due to null callid
  • Loading branch information
liviuchircu committed Jul 17, 2018
2 parents 9ee39b7 + 222125a commit 6152a4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/mid_registrar/lookup.c
Expand Up @@ -187,6 +187,12 @@ int mid_reg_lookup(struct sip_msg* req, char* _t, char* _f, char* _s)
}

if (reg_mode != MID_REG_THROTTLE_AOR) {

if ( (!req->callid && parse_headers(req, HDR_CALLID_F,0)<0) || !req->callid ) {
LM_ERR("bad request or missing Call-ID hdr\n");
return -1;
}

if (parse_uri(uri.s, uri.len, &puri) < 0) {
LM_ERR("failed to parse R-URI <%.*s>, ci: %.*s\n", uri.len,
uri.s, req->callid->body.len, req->callid->body.s);
Expand Down

0 comments on commit 6152a4b

Please sign in to comment.