Bluetooth: L2CAP: Fix segmentation
The segments need to be limited by the minimun of the segment buffer tailroom and tx MPS not the original buf length. Change-Id: I580a3bb61aa190ac0cdd3717bc06fd6e6e668304 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
3b1baa88ef
commit
37b0e0ab2e
1 changed files with 1 additions and 1 deletions
|
@ -1593,7 +1593,7 @@ segment:
|
|||
}
|
||||
|
||||
/* Don't send more that TX MPS including SDU length */
|
||||
len = min(buf->len, ch->tx.mps - sdu_hdr_len);
|
||||
len = min(net_buf_tailroom(seg), ch->tx.mps - sdu_hdr_len);
|
||||
memcpy(net_buf_add(seg, len), buf->data, len);
|
||||
net_buf_pull(buf, len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue