diff options
author | Alexander von Gernler <grunk@cvs.openbsd.org> | 2007-02-21 19:25:41 +0000 |
---|---|---|
committer | Alexander von Gernler <grunk@cvs.openbsd.org> | 2007-02-21 19:25:41 +0000 |
commit | 2fa0cec173a43a2a9dbd70ddadbfb85f0a695d5a (patch) | |
tree | 93dc8b6ffa4dedd341ac82f4db9c8662562df510 /sys/dev | |
parent | e1121c3e98ac12742dde33abd52c3c2e15a14b10 (diff) |
Don't use arbitrary 128 bytes as size of the blf key array if we know exactly
how much blowfish takes at max, which is 72 bytes.
Also define a constant for this in the include file, suggested by ray@.
ok pedro@ thib@ tedu@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/vnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 9dc37757c22..da2c15b60f4 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.68 2007/02/01 01:02:05 pedro Exp $ */ +/* $OpenBSD: vnd.c,v 1.69 2007/02/21 19:25:40 grunk Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -773,7 +773,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) } if (vio->vnd_keylen > 0) { - char key[128]; + char key[BLF_MAXUTILIZED]; if (vio->vnd_keylen > sizeof(key)) vio->vnd_keylen = sizeof(key); |