From 8b4d1ea5412fc0c3eb8c45f099fcdb2860046f4e Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Thu, 29 May 2014 15:49:38 +0200 Subject: [PATCH] shared/crypto: Fix concatenate of sign counter into the msg This patch fixes incorrectly concatenated sign counter to the message --- src/shared/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/crypto.c b/src/shared/crypto.c index e46f07fd1..b50baa5ae 100644 --- a/src/shared/crypto.c +++ b/src/shared/crypto.c @@ -273,7 +273,7 @@ bool bt_crypto_sign_att(struct bt_crypto *crypto, const uint8_t key[16], memcpy(msg, m, m_len); /* Add sign_counter to the message */ - put_le32(sign_cnt, msg + msg_len); + put_le32(sign_cnt, msg + m_len); /* The most significant octet of key corresponds to key[0] */ swap128(key, tmp); -- 2.47.3