[sr-dev] git:master:101670ac: topoh: improve checks for contact header processing
Henning Westerholt
hw at kamailio.org
Mon Feb 25 16:47:43 CET 2019
Module: kamailio
Branch: master
Commit: 101670ac2c120cf0008a860b6a766aaa529e578d
URL: https://github.com/kamailio/kamailio/commit/101670ac2c120cf0008a860b6a766aaa529e578d
Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2019-02-25T16:47:30+01:00
topoh: improve checks for contact header processing
---
Modified: src/modules/topoh/th_msg.c
---
Diff: https://github.com/kamailio/kamailio/commit/101670ac2c120cf0008a860b6a766aaa529e578d.diff
Patch: https://github.com/kamailio/kamailio/commit/101670ac2c120cf0008a860b6a766aaa529e578d.patch
---
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);
More information about the sr-dev
mailing list