Sfoglia il codice sorgente

Fix static code analysis errors reported by new coverity scan tool

bel2125 5 anni fa
parent
commit
d6a604b5cb
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -17085,8 +17085,8 @@ mg_connect_client2(const char *host,
 		return mg_connect_websocket_client(host,
 		                                   port,
 		                                   is_ssl,
-		                                   error->text,
-		                                   error->text_buffer_size,
+		                                   ((error != NULL) ? error->text : NULL),
+		                                   ((error != NULL) ? error->text_buffer_size : 0),
 		                                   (path ? path : ""),
 		                                   NULL /* TODO: origin */,
 		                                   deprecated_websocket_data_wrapper,