Diff between 352cee4717fb031edb55ecf98e03a599c4439ddd and 40f996c64afa28ddc0d9a081ba0fac3526d046b9

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +3 -0 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 9511ea8..0949224 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -2173,6 +2173,9 @@ static void notify_cb(struct bt_att_chan *chan, uint8_t opcode,
 			length -= 2;
 			pdu += 2;
 
+			if (data.len > length)
+				data.len = length;
+
 			data.data = pdu;
 
 			queue_foreach(client->notify_list, notify_handler,