From 0da6c8dec27ab1168d7cc2b74a7bf96fe64591a1 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 11 Jan 2011 16:06:41 +0000 Subject: key lengths are counted in bits --- sys/crypto/cryptodev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c index ba517c267d2..d502f3dde9c 100644 --- a/sys/crypto/cryptodev.c +++ b/sys/crypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.c,v 1.76 2011/01/11 16:04:19 deraadt Exp $ */ +/* $OpenBSD: cryptodev.c,v 1.77 2011/01/11 16:06:40 deraadt Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -266,11 +266,11 @@ cryptof_ioctl(struct file *fp, u_long cmd, caddr_t data, struct proc *p) bail: if (error) { if (crie.cri_key) { - explicit_bzero(crie.cri_key, crie.cri_klen); + explicit_bzero(crie.cri_key, crie.cri_klen / 8); free(crie.cri_key, M_XDATA); } if (cria.cri_key) { - explicit_bzero(cria.cri_key, cria.cri_klen); + explicit_bzero(cria.cri_key, cria.cri_klen / 8); free(cria.cri_key, M_XDATA); } } -- cgit v1.2.3