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