kopia lustrzana https://github.com/espressif/esp-idf
ble_mesh: stack: Add proxy cfg pdu length check
rodzic
aeb44745bf
commit
82d4bd280b
|
@ -154,6 +154,11 @@ static void proxy_cfg(struct bt_mesh_proxy_server *server)
|
|||
u8_t opcode = 0U;
|
||||
int err = 0;
|
||||
|
||||
if (server->buf.len > 29) {
|
||||
BT_ERR("Too large proxy cfg pdu (len %d)", server->buf.len);
|
||||
return;
|
||||
}
|
||||
|
||||
err = bt_mesh_net_decode(&server->buf, BLE_MESH_NET_IF_PROXY_CFG,
|
||||
&rx, &buf);
|
||||
if (err) {
|
||||
|
|
|
@ -292,6 +292,11 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client)
|
|||
u8_t opcode = 0U;
|
||||
int err = 0;
|
||||
|
||||
if (client->buf.len > 29) {
|
||||
BT_ERR("Too large proxy cfg pdu (len %d)", client->buf.len);
|
||||
return;
|
||||
}
|
||||
|
||||
err = bt_mesh_net_decode(&client->buf, BLE_MESH_NET_IF_PROXY_CFG,
|
||||
&rx, &buf);
|
||||
if (err) {
|
||||
|
|
Ładowanie…
Reference in New Issue