From 07ac1903c5717eec5921f4e50cbe7579b202db9f Mon Sep 17 00:00:00 2001 From: Piotr Narajowski Date: Mon, 3 Jun 2024 13:59:03 +0200 Subject: [PATCH] nimble/host: Fix invalid memset in ble_gattc_read_mult_cb_var This commit applies correct value when using memset to fill attr array. Fixes GATT/CL/GAR/BI-13-C, GATT/CL/GAR/BI-36-C, GATT/CL/GAR/BI-38-C, GATT/CL/GAR/BI-42-C, GATT/CL/GAR/BI-44-C, GATT/CL/GAR/BV-05-C --- nimble/host/src/ble_gattc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c index be19f2dc9..4507317ce 100644 --- a/nimble/host/src/ble_gattc.c +++ b/nimble/host/src/ble_gattc.c @@ -3345,7 +3345,7 @@ ble_gattc_read_mult_cb_var(struct ble_gattc_proc *proc, int status, return 0; } - memset(attr, 0, sizeof(*attr)); + memset(attr, 0, sizeof(attr)); for (i = 0; i < proc->read_mult.num_handles; i++) { attr[i].handle = proc->read_mult.handles[i];