Explorar o código

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

bel2125 %!s(int64=8) %!d(string=hai) anos
pai
achega
432b51f5dc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 	}