Index: cryptodev.c =================================================================== RCS file: /usr/repo/src/sys/opencrypto/cryptodev.c,v retrieving revision 1.25 diff -u -p -r1.25 cryptodev.c --- cryptodev.c 27 Feb 2005 22:10:25 -0000 1.25 +++ cryptodev.c 18 Aug 2005 07:12:06 -0000 @@ -336,8 +336,10 @@ cryptodev_op( if (cop->len > 256*1024-4) return (E2BIG); - if (cse->txform && (cop->len % cse->txform->blocksize) != 0) - return (EINVAL); + if (cse->txform) { + if (cop->len == 0 || (cop->len % cse->txform->blocksize) != 0) + return (EINVAL); + } cse->uio.uio_iov = &cse->iovec; cse->uio.uio_iovcnt = 1;