Skip to content

Commit d1f0a98

Browse files
andy-shevVudentz
authored andcommitted
Bluetooth: MGMT: Use correct address for memcpy()
In function ‘fortify_memcpy_chk’, inlined from ‘get_conn_info_complete’ at net/bluetooth/mgmt.c:7281:2: include/linux/fortify-string.h:592:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning] 592 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors This is due to the wrong member is used for memcpy(). Use correct one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent 95b7015 commit d1f0a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7285,7 +7285,7 @@ static void get_conn_info_complete(struct hci_dev *hdev, void *data, int err)
72857285

72867286
bt_dev_dbg(hdev, "err %d", err);
72877287

7288-
memcpy(&rp.addr, &cp->addr.bdaddr, sizeof(rp.addr));
7288+
memcpy(&rp.addr, &cp->addr, sizeof(rp.addr));
72897289

72907290
status = mgmt_status(err);
72917291
if (status == MGMT_STATUS_SUCCESS) {

0 commit comments

Comments
 (0)