diff --git a/main/bluetooth/att.c b/main/bluetooth/att.c index 7a73b8df..a2e27fa6 100644 --- a/main/bluetooth/att.c +++ b/main/bluetooth/att.c @@ -488,8 +488,9 @@ static void bt_att_cmd_mc_rd_rsp(uint16_t handle, uint8_t blob) { len = (block * 4096) - mc_offset; - if (len > (mtu - 1)) { - len = mtu - 1; + if (len > (mtu - 2)) { + len = mtu - 2; + len &= 0xFFFFFFFC; } mc_read(mc_offset, bt_hci_pkt_tmp.att_data, len);