You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2024/06/12 09:00:54 UTC
(mynewt-nimble) 01/02: nimble/host: Fix invalid memset in ble_gattc_read_mult_cb_var
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 07ac1903c5717eec5921f4e50cbe7579b202db9f
Author: Piotr Narajowski <pi...@codecoup.pl>
AuthorDate: Mon Jun 3 13:59:03 2024 +0200
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 be19f2dc..4507317c 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];