diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-05-04 12:01:39 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-05-04 12:01:39 +0800 |
commit | b4d01daf691126d8dd11139ffc67baaaebb6055c (patch) | |
tree | 88e27842e257c482123a01878f730a159bc856e7 /crypto | |
parent | 5fac43b0f151ac03417229eeb1c1ed517cab7569 (diff) | |
parent | 91d95be0492ceddf1342e7ff1169fff3d71baa9b (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'crypto')
-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 8374ca8b6579..6d4da8fd24fd 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -488,6 +488,8 @@ static int __test_aead(struct crypto_aead *tfm, int enc, aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, tcrypt_complete, &result); + iv_len = crypto_aead_ivsize(tfm); + for (i = 0, j = 0; i < tcount; i++) { if (template[i].np) continue; @@ -508,7 +510,6 @@ static int __test_aead(struct crypto_aead *tfm, int enc, memcpy(input, template[i].input, template[i].ilen); memcpy(assoc, template[i].assoc, template[i].alen); - iv_len = crypto_aead_ivsize(tfm); if (template[i].iv) memcpy(iv, template[i].iv, iv_len); else @@ -617,7 +618,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc, j++; if (template[i].iv) - memcpy(iv, template[i].iv, MAX_IVLEN); + memcpy(iv, template[i].iv, iv_len); else memset(iv, 0, MAX_IVLEN); |