From 14472d757d1beea7b92c0226c9be3c6901c915e5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 27 Dec 2016 11:52:47 +0200 Subject: [PATCH] Bluetooth: Fix incorrect call to memcpy() This call was supposed to be net_buf_add_mem(). Change-Id: I5e4a718474905c433533fd1c1d7e8e0b7ff35739 Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index fee9cbaa058..681a7da2559 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -408,7 +408,7 @@ static int set_random_address(const bt_addr_t *addr) return -ENOBUFS; } - memcpy(buf, addr, sizeof(*addr)); + net_buf_add_mem(buf, addr, sizeof(*addr)); err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_RANDOM_ADDRESS, buf, NULL); if (err) {