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 | 09d8cc538d728e87286477f6b4266935d3ac9554 (patch) | |
tree | 2e06766c6de24be508328fd0c2f8d3e821f2ad3b /crypto/testmgr.c | |
parent | fc4d0d2a1b069a231939ca4b01a3d003e77c723a (diff) | |
parent | 82d748eb43a673a56b639efd4d698e1e95715d82 (diff) | |
download | linux-crypto-09d8cc538d728e87286477f6b4266935d3ac9554.tar.gz linux-crypto-09d8cc538d728e87286477f6b4266935d3ac9554.zip |
Merge remote-tracking branch 'mac80211-next/master' into next
Diffstat (limited to '')
-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 35c2de13..fa18753f 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); |