Module: kamailio
Branch: 5.6
Commit: ee9cbc7585fb645bfa7117f8cd5122f3ae260d57
URL:
https://github.com/kamailio/kamailio/commit/ee9cbc7585fb645bfa7117f8cd5122f…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-12-15T13:05:16Z
sanity: Prevent segfault
For star Contacts, there are no URIs that can be checked.
(cherry picked from commit f1bac3433c61b0a5b4be08e7738a3a1aa0defe73)
---
Modified: src/modules/sanity/sanity.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ee9cbc7585fb645bfa7117f8cd5122f…
Patch:
https://github.com/kamailio/kamailio/commit/ee9cbc7585fb645bfa7117f8cd5122f…
---
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) {