Module: kamailio
Branch: master
Commit: f1bac3433c61b0a5b4be08e7738a3a1aa0defe73
URL:
https://github.com/kamailio/kamailio/commit/f1bac3433c61b0a5b4be08e7738a3a1…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-12-15T13:50:14+01:00
sanity: Prevent segfault
For star Contacts, there are no URIs that can be checked.
---
Modified: src/modules/sanity/sanity.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f1bac3433c61b0a5b4be08e7738a3a1…
Patch:
https://github.com/kamailio/kamailio/commit/f1bac3433c61b0a5b4be08e7738a3a1…
---
diff --git a/src/modules/sanity/sanity.c b/src/modules/sanity/sanity.c
index f49d6e50c1..c6563e23c4 100644
--- a/src/modules/sanity/sanity.c
+++ b/src/modules/sanity/sanity.c
@@ -820,7 +820,8 @@ int check_parse_uris(sip_msg_t* msg, int checks) {
}
return SANITY_CHECK_FAILED;
}
- if (parse_uri(
+ if (!((struct contact_body*)msg->contact->parsed)->star
+ && parse_uri(
((struct contact_body*)msg->contact->parsed)->contacts->uri.s,
((struct contact_body*)msg->contact->parsed)->contacts->uri.len,
&uri) != 0) {