mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:15:58 +08:00
Update to FreeBSD head 2018-06-01
Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9. Update #3472.
This commit is contained in:
@@ -43,8 +43,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <rtems/bsd/local/opt_compat.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@@ -86,7 +86,7 @@ static int
|
||||
swcr_encdec(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf,
|
||||
int flags)
|
||||
{
|
||||
unsigned char iv[EALG_MAX_BLOCK_LEN], blk[EALG_MAX_BLOCK_LEN], *idat;
|
||||
unsigned char iv[EALG_MAX_BLOCK_LEN], blk[EALG_MAX_BLOCK_LEN];
|
||||
unsigned char *ivp, *nivp, iv2[EALG_MAX_BLOCK_LEN];
|
||||
struct enc_xform *exf;
|
||||
int i, j, k, blks, ind, count, ivlen;
|
||||
@@ -251,11 +251,13 @@ swcr_encdec(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf,
|
||||
}
|
||||
|
||||
while (uio->uio_iov[ind].iov_len >= k + blks && i > 0) {
|
||||
uint8_t *idat;
|
||||
size_t nb, rem;
|
||||
|
||||
nb = blks;
|
||||
rem = uio->uio_iov[ind].iov_len - k;
|
||||
idat = (char *)uio->uio_iov[ind].iov_base + k;
|
||||
rem = MIN((size_t)i,
|
||||
uio->uio_iov[ind].iov_len - (size_t)k);
|
||||
idat = (uint8_t *)uio->uio_iov[ind].iov_base + k;
|
||||
|
||||
if (exf->reinit) {
|
||||
if ((crd->crd_flags & CRD_F_ENCRYPT) != 0 &&
|
||||
@@ -298,7 +300,6 @@ swcr_encdec(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf,
|
||||
ivp = nivp;
|
||||
}
|
||||
|
||||
idat += nb;
|
||||
count += nb;
|
||||
k += nb;
|
||||
i -= nb;
|
||||
|
Reference in New Issue
Block a user