Sfoglia il codice sorgente

Make the cast to size_t explicit

The 'n' variable is checked for being negative a few lines earlier so this
is a safe cast
Matt Clarkson 10 anni fa
parent
commit
b0bf38c0a9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -7177,7 +7177,7 @@ static void read_websocket(struct mg_connection *conn,
 						error = 1;
 						break;
 					}
-					len += n;
+					len += (size_t)n;
 				}
 				if (error) {
 					mg_cry(conn, "Websocket pull failed; closing connection");