You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/02/01 22:12:40 UTC

[7/8] incubator-mynewt-core git commit: BLE Host - Fix crash in unit test

BLE Host - Fix crash in unit test


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5a0f8021
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5a0f8021
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5a0f8021

Branch: refs/heads/develop
Commit: 5a0f8021ad8082b542baf6945cb5322c5fcf1a4e
Parents: 5408136
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Feb 1 14:09:50 2017 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Feb 1 14:09:50 2017 -0800

----------------------------------------------------------------------
 net/nimble/host/src/ble_sm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5a0f8021/net/nimble/host/src/ble_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm.c b/net/nimble/host/src/ble_sm.c
index fe312d4..a4e189d 100644
--- a/net/nimble/host/src/ble_sm.c
+++ b/net/nimble/host/src/ble_sm.c
@@ -515,7 +515,7 @@ ble_sm_persist_keys(struct ble_sm_proc *proc)
     /* If we got an identity address, use that for key storage. */
     if (proc->peer_keys.addr_valid) {
         peer_addr.type = proc->peer_keys.addr_type;
-        memcpy(peer_addr.val, proc->peer_keys.addr, sizeof peer_addr);
+        memcpy(peer_addr.val, proc->peer_keys.addr, sizeof peer_addr.val);
 
         /* Update identity address in conn.
          * If peer's address was an RPA, we store it as RPA since peer's address