diff --git a/src/classic/avrcp_target.c b/src/classic/avrcp_target.c index 31d3a6d6e..b71666c66 100644 --- a/src/classic/avrcp_target.c +++ b/src/classic/avrcp_target.c @@ -1024,9 +1024,9 @@ static int avrcp_target_send_notification(uint16_t cid, avrcp_connection_t * con uint16_t pos = 0; l2cap_reserve_packet_buffer(); uint8_t * packet = l2cap_get_outgoing_buffer(); - uint16_t size = l2cap_get_remote_mtu_for_local_cid(connection->l2cap_signaling_cid); - btstack_assert((14 + value_len) <= size); + // value <= 8 ==> pdu <= 22 < L2CAP Default MTU + btstack_assert((14 + value_len) <= l2cap_get_remote_mtu_for_local_cid(connection->l2cap_signaling_cid)); connection->packet_type = AVRCP_SINGLE_PACKET; packet[pos++] = (connection->transaction_id << 4) | (connection->packet_type << 2) | (AVRCP_RESPONSE_FRAME << 1) | 0;