Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2008 16:11:07 +0000 (UTC)
From:      Doug Rabson <dfr@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184477 - head/sys/opencrypto
Message-ID:  <200810301611.m9UGB73w055778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810301611.m9UGB73w055778>