Parcourir la source

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

bel2125 il y a 8 ans
Parent
commit
432b51f5dc
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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;
 	}