}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
/**
* Handle reading key data, peer-info, username/password, OCC
* from the TLS control channel (cleartext).
goto error;
}
/* read type */
- uint16_t type = buf_read_u16(buf);
- uint16_t len = buf_read_u16(buf);
- if (buf_len(buf) < len)
+ int type = buf_read_u16(buf);
+ int len = buf_read_u16(buf);
+ if (type < 0 || len < 0 || buf_len(buf) < len)
{
goto error;
}
{
goto error;
}
- uint16_t flags = buf_read_u16(buf);
+ int flags = buf_read_u16(buf);
if (flags & EARLY_NEG_FLAG_RESEND_WKC)
{
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
void
tls_prepend_opcode_v1(const struct tls_multi *multi, struct buffer *buf)
{