Skip to content
Commit c0b1ed06 authored by Jiawei Yang's avatar Jiawei Yang Committed by Dan Kalowsky
Browse files

Bluetooth: RFCOMM: Fix MTU calculation in rfcomm_connected



The MTU calculation in rfcomm_connected() was incorrectly adding the FCS
size instead of subtracting it.
This could lead to buffer overflows when sending data that exceeds
the actual available space.

Fix the calculation by properly subtracting both the RFCOMM header size and
the FCS size from the L2CAP MTU to get the correct RFCOMM session MTU.

Signed-off-by: default avatarJiawei Yang <jiawei.yang_1@nxp.com>
parent 79204ecc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment