]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/bluetooth/mgmt.c
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[karo-tx-linux.git] / net / bluetooth / mgmt.c
index 3a15f0964fabbdee7e802619bfda9bd15adba542..ccaf5a436d8f7a70799729a04ffc17583d11913f 100644 (file)
@@ -7850,7 +7850,7 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, bool persistent)
        /* Make sure we copy only the significant bytes based on the
         * encryption key size, and set the rest of the value to zeroes.
         */
-       memcpy(ev.key.val, key->val, sizeof(key->enc_size));
+       memcpy(ev.key.val, key->val, key->enc_size);
        memset(ev.key.val + key->enc_size, 0,
               sizeof(ev.key.val) - key->enc_size);