소스 검색

modules/siptrace: fix parsing of unsecure ws uris

Sebastian Denz 9 년 전
부모
커밋
0a0401d276
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/siptrace/siptrace.c

+ 1 - 1
modules/siptrace/siptrace.c

@@ -1854,7 +1854,7 @@ static int pipport2su (char *pipport, union sockaddr_union *tmp_su, unsigned int
 	if(strncmp(pipport, "udp:",4) == 0) *proto = IPPROTO_UDP;
 	else if(strncmp(pipport, "tcp:",4) == 0) *proto = IPPROTO_TCP;
 	else if(strncmp(pipport, "tls:",4) == 0) *proto = IPPROTO_IDP; /* fake proto type */
-	else if(strncmp(pipport, "ws:",3) == 0) *proto = IPPROTO_IDP; /* fake proto type */
+	else if(strncmp(pipport, "ws:",3) == 0) cutlen = 3, *proto = IPPROTO_IDP; /* fake proto type */
 	else if(strncmp(pipport, "wss:",4) == 0) *proto = IPPROTO_IDP; /* fake proto type */
 #ifdef USE_SCTP
 	else if(strncmp(pipport, "sctp:",5) == 0) cutlen = 5, *proto = IPPROTO_SCTP;