[PATCH 4/9] shared/crypto: Fix concatenate of sign counter into the msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 e46f07f..b50baa5 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);
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux