Browse Source

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

bel2125 8 years ago
parent
commit
432b51f5dc
1 changed files with 1 additions and 1 deletions
  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) {
 	if (chain == NULL) {
 		chain = pem;
 		chain = pem;
 	}
 	}
-	if (*chain == 0) {
+	if ((chain != NULL) && (*chain == 0)) {
 		chain = NULL;
 		chain = NULL;
 	}
 	}