Page MenuHomeFreeBSD

D29517.id86722.diff
No OneTemporary

D29517.id86722.diff

diff --git a/sys/crypto/openssl/ossl_chacha20.c b/sys/crypto/openssl/ossl_chacha20.c
--- a/sys/crypto/openssl/ossl_chacha20.c
+++ b/sys/crypto/openssl/ossl_chacha20.c
@@ -88,7 +88,8 @@
out = outseg;
/* Figure out how many blocks we can encrypt/decrypt at once. */
- todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE);
+ todo = rounddown(MIN(resid, MIN(inlen, outlen)),
+ CHACHA_BLK_SIZE);
#ifdef __LP64__
/* ChaCha20_ctr32() assumes length is <= 4GB. */
@@ -218,7 +219,8 @@
out = outseg;
/* Figure out how many blocks we can encrypt/decrypt at once. */
- todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE);
+ todo = rounddown(MIN(resid, MIN(inlen, outlen)),
+ CHACHA_BLK_SIZE);
#ifdef __LP64__
/* ChaCha20_ctr32() assumes length is <= 4GB. */
@@ -389,7 +391,8 @@
out = outseg;
/* Figure out how many blocks we can encrypt/decrypt at once. */
- todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE);
+ todo = rounddown(MIN(resid, MIN(inlen, outlen)),
+ CHACHA_BLK_SIZE);
#ifdef __LP64__
/* ChaCha20_ctr32() assumes length is <= 4GB. */

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 30, 8:46 AM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17854257
Default Alt Text
D29517.id86722.diff (1 KB)

Event Timeline