summaryrefslogtreecommitdiff
path: root/usr/src/common/crypto/modes/modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/crypto/modes/modes.c')
-rw-r--r--usr/src/common/crypto/modes/modes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/src/common/crypto/modes/modes.c b/usr/src/common/crypto/modes/modes.c
index fbf66c0531..212374e152 100644
--- a/usr/src/common/crypto/modes/modes.c
+++ b/usr/src/common/crypto/modes/modes.c
@@ -264,7 +264,7 @@ crypto_uio_data(crypto_data_t *data, uchar_t *buf, int len, cmd_type_t cmd,
offset -= uiop->uio_iov[vec_idx++].iov_len)
;
- if (vec_idx == uiop->uio_iovcnt) {
+ if (vec_idx == uiop->uio_iovcnt && length > 0) {
/*
* The caller specified an offset that is larger than
* the total size of the buffers it provided.