summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2008-08-21 16:49:57 +0000
committerraj <raj@FreeBSD.org>2008-08-21 16:49:57 +0000
commit55245871652c34dba2ba70f34edafc983ecdd479 (patch)
tree1e972851fedf57be19f8e968faa602772cf2349c /tools
parent85c7cc2d414bcd44dcc284e051368ce50c247fd6 (diff)
downloadFreeBSD-src-55245871652c34dba2ba70f34edafc983ecdd479.zip
FreeBSD-src-55245871652c34dba2ba70f34edafc983ecdd479.tar.gz
Increase cryptotest tool initialization vector (IV) size.
This fixes potential out-of-bound accesses when testing ciphers with block size greater than 8 bytes (e.g. AES). Submitted by: Bartlomiej Sieka tur ! semihalf dot com Discussed with: pjd, sam
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/crypto/cryptotest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools/crypto/cryptotest.c b/tools/tools/crypto/cryptotest.c
index 13c52dd..5f5e450 100644
--- a/tools/tools/crypto/cryptotest.c
+++ b/tools/tools/crypto/cryptotest.c
@@ -250,7 +250,7 @@ runtest(struct alg *alg, int count, int size, u_long cmd, struct timeval *tv)
char *cleartext, *ciphertext, *originaltext;
struct session2_op sop;
struct crypt_op cop;
- char iv[8];
+ char iv[EALG_MAX_BLOCK_LEN];
bzero(&sop, sizeof(sop));
if (!alg->ishash) {
OpenPOWER on IntegriCloud