diff options
-rw-r--r-- | sys/crypto/cryptosoft.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c index df8a5b2997e..e091818dc1d 100644 --- a/sys/crypto/cryptosoft.c +++ b/sys/crypto/cryptosoft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptosoft.c,v 1.67 2012/12/07 20:55:51 mikeb Exp $ */ +/* $OpenBSD: cryptosoft.c,v 1.68 2012/12/11 14:49:31 mikeb Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -603,7 +603,8 @@ swcr_authenc(struct cryptop *crp) for (i = iskip; i < crda->crd_len; i += blksz) { len = MIN(crda->crd_len - i, blksz - oskip); COPYDATA(outtype, buf, crda->crd_skip + i, len, blk + oskip); - axf->Update(&ctx, blk, len + oskip); + bzero(blk + len + oskip, blksz - len - oskip); + axf->Update(&ctx, blk, blksz); oskip = 0; /* reset initial output offset */ } |