projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git]
/
crypto
/
testmgr.c
diff --git
a/crypto/testmgr.c
b/crypto/testmgr.c
index 35c2de13697182ba22190ea6d0c05d46c6b905be..fa18753f5c344de0eba58d9c9c1296255f4178c7 100644
(file)
--- 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;
char *xbuf[XBUFSIZE];
char *xoutbuf[XBUFSIZE];
int ret = -ENOMEM;
+ unsigned int ivsize = crypto_skcipher_ivsize(tfm);
if (testmgr_alloc_buf(xbuf))
goto out_nobuf;
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)
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv,
MAX_IVLEN
);
+ memcpy(iv, template[i].iv,
ivsize
);
else
memset(iv, 0, MAX_IVLEN);
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)
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv,
MAX_IVLEN
);
+ memcpy(iv, template[i].iv,
ivsize
);
else
memset(iv, 0, MAX_IVLEN);
else
memset(iv, 0, MAX_IVLEN);