소스 검색

sanity: Prevent segfault

For star Contacts, there are no URIs that can be checked.
Bastian Triller 2 년 전
부모
커밋
f1bac3433c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/modules/sanity/sanity.c

+ 2 - 1
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) {