From da5596731b87341503652aa97430d1125279a60b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 22 Jan 2013 13:17:14 +0200 Subject: [PATCH] core: Fix mgmt_get_connections response size checking Each address entry is of the size mgmt_addr_info and not bdaddr_t. --- src/adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 927a614cd..75ce4e8e1 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2651,7 +2651,8 @@ static void get_connections_complete(uint8_t status, uint16_t length, DBG("Connection count: %d", conn_count); - if (conn_count * sizeof(bdaddr_t) + sizeof(*rp) != length) { + if (conn_count * sizeof(struct mgmt_addr_info) + + sizeof(*rp) != length) { error("Incorrect packet size for get connections response"); return; } -- 2.47.3