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 <piotr.narajow...@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];

Reply via email to