Bluetooth: att: Fix invalid discovered descriptors parsing

This patch fixes the issue with 128bit uuid descriptors discovery.
Data from Find Information Response were parsed improperly,
because length took into account the size of pointer to info data,
not data itself.

Change-Id: Ifad0110705bacc3c757a91ebbd97af5ba93897d9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This commit is contained in:
Mariusz Skamra 2015-10-13 11:53:56 +02:00 committed by Anas Nashif
commit 2e3eccd7a1

View file

@ -918,11 +918,11 @@ static void att_find_info_rsp(struct bt_conn *conn, uint8_t err,
switch (rsp->format) {
case BT_ATT_INFO_16:
uuid.type = BT_UUID_16;
len = sizeof(info.i16);
len = sizeof(*info.i16);
break;
case BT_ATT_INFO_128:
uuid.type = BT_UUID_128;
len = sizeof(info.i128);
len = sizeof(*info.i128);
break;
default:
BT_ERR("Invalid format %u\n", rsp->format);