diff options
author | dfr <dfr@FreeBSD.org> | 2008-10-30 16:11:07 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-10-30 16:11:07 +0000 |
commit | 11fd66de64959e9900dfb765d8f6987bcf8c6a8f (patch) | |
tree | c1d17f59cfd3b094ada6d5a36e6b6c4f0b3cbf94 /sys/opencrypto | |
parent | 5c55d9c1df94b43c6addfdaa79a82e6f779b6cd1 (diff) | |
download | FreeBSD-src-11fd66de64959e9900dfb765d8f6987bcf8c6a8f.zip FreeBSD-src-11fd66de64959e9900dfb765d8f6987bcf8c6a8f.tar.gz |
Don't hang if encrypting/decrypting using struct iovecs where one of the
iovecs ends on a crypto block boundary.
Diffstat (limited to 'sys/opencrypto')
-rw-r--r-- | sys/opencrypto/cryptosoft.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index d115dbc..6a802a1 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -352,6 +352,10 @@ swcr_encdec(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf, k += blks; i -= blks; } + if (k == iov->iov_len) { + iov++; + k = 0; + } } return 0; /* Done with iovec encryption/decryption */ |