X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=net%2Fbluetooth%2Fmgmt.c;h=ccaf5a436d8f7a70799729a04ffc17583d11913f;hb=0aa65cc0c2ca7e3908b1e4ae7946d909a4882249;hp=3a15f0964fabbdee7e802619bfda9bd15adba542;hpb=c0015bf3a34961342a27b021672049e535ab36a1;p=karo-tx-linux.git diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3a15f0964fab..ccaf5a436d8f 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -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);