Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115835612
D29517.id86722.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29517.id86722.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D29517: ossl: Don't encryt/decrypt too much data for chacha20.
Attached
Detach File
Event Timeline
Log In to Comment