瀏覽代碼

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;
 	}