Bluetooth: Fix another incorrect memcpy call
This should also have been net_buf_add_mem(). Otherwise the buffer gets corrupted. Change-Id: I4687584777f446d398182c3e8c2cde5946987da4 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
1921b53484
commit
fce1938a24
1 changed files with 1 additions and 1 deletions
|
@ -957,7 +957,7 @@ static struct net_buf *create_frag(struct bt_conn *conn, struct net_buf *buf)
|
|||
|
||||
frag_len = min(conn_mtu(conn), net_buf_tailroom(frag));
|
||||
|
||||
memcpy(frag, buf->data, frag_len);
|
||||
net_buf_add_mem(frag, buf->data, frag_len);
|
||||
net_buf_pull(buf, frag_len);
|
||||
|
||||
return frag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue