소스 검색

Possible fix for a possible null pointer deref (may be a false positive reported by static source code analysis)

bel2125 8 년 전
부모
커밋
432b51f5dc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -12843,7 +12843,7 @@ set_ssl_option(struct mg_context *ctx)
 	if (chain == NULL) {
 		chain = pem;
 	}
-	if (*chain == 0) {
+	if ((chain != NULL) && (*chain == 0)) {
 		chain = NULL;
 	}