diff options
| author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-10-25 12:38:20 +0200 |
|---|---|---|
| committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-10-25 12:38:20 +0200 |
| commit | 10d15322ed26652263a579bcb59dfd49ab8a30de (patch) | |
| tree | b1497de1b8ffd34b991cdf6e21de1c7a0a65f1de /crypto/testmgr.c | |
| parent | 0316d30ea3e66379cd30ed70a114bc282159bb4c (diff) | |
| parent | e5a9f8d04660da7ef3a98260aa74c3976f9cb4cd (diff) | |
Merge remote-tracking branch 'mac80211-next/master' into next
Diffstat (limited to 'crypto/testmgr.c')
| -rw-r--r-- | crypto/testmgr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 35c2de136971..fa18753f5c34 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -940,6 +940,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc, char *xbuf[XBUFSIZE]; char *xoutbuf[XBUFSIZE]; int ret = -ENOMEM; + unsigned int ivsize = crypto_skcipher_ivsize(tfm); if (testmgr_alloc_buf(xbuf)) goto out_nobuf; @@ -975,7 +976,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc, continue; if (template[i].iv) - memcpy(iv, template[i].iv, MAX_IVLEN); + memcpy(iv, template[i].iv, ivsize); else memset(iv, 0, MAX_IVLEN); @@ -1051,7 +1052,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc, continue; if (template[i].iv) - memcpy(iv, template[i].iv, MAX_IVLEN); + memcpy(iv, template[i].iv, ivsize); else memset(iv, 0, MAX_IVLEN); |
