Skip to content

Commit

Permalink
sanity: Prevent segfault
Browse files Browse the repository at this point in the history
For star Contacts, there are no URIs that can be checked.

(cherry picked from commit f1bac34)
(cherry picked from commit ee9cbc7)
  • Loading branch information
btriller authored and henningw committed Dec 15, 2022
1 parent c2cb540 commit ddc188b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/sanity/sanity.c
Expand Up @@ -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) {
Expand Down

0 comments on commit ddc188b

Please sign in to comment.