summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-10-13 00:21:28 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-10-13 00:21:28 +0000
commit294189c6a84d22db437501a631394b2ded5bac99 (patch)
tree0a613d675d120b27c38ab81deb71b6b4e274cd55
parentee01bd4851c82140124fd75a4a98017fb266fdf2 (diff)
free the correct IV length, don't assume it's always the cipher
blocksize; ok dtucker@
-rw-r--r--usr.bin/ssh/kex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index 05628732f96..111a3e52f48 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.110 2015/08/21 23:57:48 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.111 2015/10/13 00:21:27 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -462,7 +462,7 @@ kex_free_newkeys(struct newkeys *newkeys)
newkeys->enc.key = NULL;
}
if (newkeys->enc.iv) {
- explicit_bzero(newkeys->enc.iv, newkeys->enc.block_size);
+ explicit_bzero(newkeys->enc.iv, newkeys->enc.iv_len);
free(newkeys->enc.iv);
newkeys->enc.iv = NULL;
}