Bluetooth: ATT: Fix using uninitialized conn at find_info_cb

This leads to unexpected responses where the data can be bigger than
the MTU negotiated.

Change-Id: I395f85ce8b132b3c1727978eed8491ae4745b078
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2015-07-29 15:41:24 +03:00 committed by Anas Nashif
commit 9c17e83d68

View file

@ -312,6 +312,7 @@ static uint8_t att_find_info_rsp(struct bt_conn *conn, uint16_t start_handle,
return BT_ATT_ERR_UNLIKELY;
}
data.conn = conn;
bt_gatt_foreach_attr(start_handle, end_handle, find_info_cb, &data);
if (!data.rsp) {