mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
silence some compilers
This commit is contained in:
1 parent
7d77d8f3d7
commit
c1f8dafc72
1 file changed
+4
-3
+4
-3
@@ -19121,9 +19121,10 @@ static int mg_tls_server_recv_hello(struct mg_connection *c) {
|
|||||||
if (key_exchange_len > n - 2)
|
if (key_exchange_len > n - 2)
|
||||||
goto fail;
|
goto fail;
|
||||||
for (k = 0; k < key_exchange_len;) {
|
for (k = 0; k < key_exchange_len;) {
|
||||||
|
uint16_t m, group;
|
||||||
if ((key_exchange_len - k) < 4) goto fail;
|
if ((key_exchange_len - k) < 4) goto fail;
|
||||||
uint16_t m = MG_LOAD_BE16(key_exchange + k + 2);
|
m = MG_LOAD_BE16(key_exchange + k + 2);
|
||||||
uint16_t group = MG_LOAD_BE16(key_exchange + k);
|
group = MG_LOAD_BE16(key_exchange + k);
|
||||||
if (((uint32_t) m + k + 4) > key_exchange_len) goto fail;
|
if (((uint32_t) m + k + 4) > key_exchange_len) goto fail;
|
||||||
// secp256r1, uncompressed point 0x04 || X || Y
|
// secp256r1, uncompressed point 0x04 || X || Y
|
||||||
if (group == 0x0017 && m == 65 && key_exchange[k + 4] == 0x04) {
|
if (group == 0x0017 && m == 65 && key_exchange[k + 4] == 0x04) {
|
||||||
@@ -30649,7 +30650,7 @@ static bool mg_ws_client_handshake(struct mg_connection *c) {
|
|||||||
|
|
||||||
static void mg_ws_cb(struct mg_connection *c, int ev, void *ev_data) {
|
static void mg_ws_cb(struct mg_connection *c, int ev, void *ev_data) {
|
||||||
struct ws_msg msg;
|
struct ws_msg msg;
|
||||||
bool msk; // is this frame masked ?
|
bool msk = false; // is this frame masked ?
|
||||||
size_t ofs = (size_t) c->pfn_data;
|
size_t ofs = (size_t) c->pfn_data;
|
||||||
|
|
||||||
// assert(ofs < c->recv.len);
|
// assert(ofs < c->recv.len);
|
||||||
|
|||||||
Reference in new issue
Block a user