Module: kamailio Branch: 5.0 Commit: d3d5fcbe57c8e61bc0926250a7273b1aa9b9bf8c URL: https://github.com/kamailio/kamailio/commit/d3d5fcbe57c8e61bc0926250a7273b1aa9b9bf8c
Author: Henning Westerholt <[email protected]> Committer: Henning Westerholt <[email protected]> Date: 2019-04-03T23:25:03+02:00 topoh: improve checks for contact header processing (cherry picked from commit 101670ac2c120cf0008a860b6a766aaa529e578d) --- Modified: src/modules/topoh/th_msg.c --- Diff: https://github.com/kamailio/kamailio/commit/d3d5fcbe57c8e61bc0926250a7273b1aa9b9bf8c.diff Patch: https://github.com/kamailio/kamailio/commit/d3d5fcbe57c8e61bc0926250a7273b1aa9b9bf8c.patch --- diff --git a/src/modules/topoh/th_msg.c b/src/modules/topoh/th_msg.c index f0c3420309..3de34f13f1 100644 --- a/src/modules/topoh/th_msg.c +++ b/src/modules/topoh/th_msg.c @@ -267,6 +267,11 @@ int th_mask_contact(sip_msg_t *msg) } c = ((contact_body_t*)msg->contact->parsed)->contacts; + if(c == NULL) + { + LM_ERR("invalid contact header\n"); + return -1; + } in = c->uri; out.s = th_mask_encode(in.s, in.len, &th_uri_prefix, &out.len); _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
