소스 검색

Initialize hostend to avoid false warning

bel 10 년 전
부모
커밋
3212e78e54
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/civetweb.c

+ 2 - 1
src/civetweb.c

@@ -9981,7 +9981,8 @@ get_rel_url_at_current_server(const char *uri, const struct mg_connection *conn)
 	size_t domain_len;
 	unsigned long port = 0;
 	int i;
-	char *hostend, *portbegin, *portend;
+	char *hostend = NULL;
+    char *portbegin, *portend;
 
 	/* DNS is case insensitive, so use case insensitive string compare here */
 	domain = conn->ctx->config[AUTHENTICATION_DOMAIN];