Page MenuHomeFreeBSD

D29517.id86628.diff
No OneTemporary

D29517.id86628.diff

Index: sys/crypto/openssl/ossl_chacha20.c
===================================================================
--- sys/crypto/openssl/ossl_chacha20.c
+++ 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
Mon, Nov 10, 2:24 AM (3 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25079092
Default Alt Text
D29517.id86628.diff (1 KB)

Event Timeline