svn commit: r184477 - head/sys/opencrypto

Doug Rabson dfr at FreeBSD.org
Thu Oct 30 09:11:07 PDT 2008


Author: dfr
Date: Thu Oct 30 16:11:07 2008
New Revision: 184477
URL: http://svn.freebsd.org/changeset/base/184477

Log:
  Don't hang if encrypting/decrypting using struct iovecs where one of the
  iovecs ends on a crypto block boundary.

Modified:
  head/sys/opencrypto/cryptosoft.c

Modified: head/sys/opencrypto/cryptosoft.c
==============================================================================
--- head/sys/opencrypto/cryptosoft.c	Thu Oct 30 16:09:08 2008	(r184476)
+++ head/sys/opencrypto/cryptosoft.c	Thu Oct 30 16:11:07 2008	(r184477)
@@ -352,6 +352,10 @@ swcr_encdec(struct cryptodesc *crd, stru
 				k += blks;
 				i -= blks;
 			}
+			if (k == iov->iov_len) {
+				iov++;
+				k = 0;
+			}
 		}
 
 		return 0; /* Done with iovec encryption/decryption */


More information about the svn-src-all mailing list