The type of the expression `(uint16_t) server_names_len + 2` gets
implicitly widened to int. Change the type of server_names_len to
uint32_t to avoid the following warnings:
../../src/node_crypto_clienthello.cc:144: warning: comparison
between signed and unsigned integer expressions
../../src/node_crypto_clienthello.cc:146: warning: comparison
between signed and unsigned integer expressions
{
if (len < 2)
return;
- uint16_t server_names_len = (data[0] << 8) + data[1];
+ uint32_t server_names_len = (data[0] << 8) + data[1];
if (server_names_len + 2 > len)
return;
for (size_t offset = 2; offset < 2 + server_names_len; ) {