Module: kamailio Branch: 5.2 Commit: 55f5c820655c3b53863043569f05b97ad615abbc URL: https://github.com/kamailio/kamailio/commit/55f5c820655c3b53863043569f05b97a...
Author: Henning Westerholt hw@kamailio.org Committer: Henning Westerholt hw@kamailio.org Date: 2019-02-25T16:48:02+01: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/55f5c820655c3b53863043569f05b97a... Patch: https://github.com/kamailio/kamailio/commit/55f5c820655c3b53863043569f05b97a...
---
diff --git a/src/modules/topoh/th_msg.c b/src/modules/topoh/th_msg.c index a3b6ab5f29..8b8d278b25 100644 --- a/src/modules/topoh/th_msg.c +++ b/src/modules/topoh/th_msg.c @@ -275,6 +275,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);