aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcryptobox/chacha20
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-07 16:37:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-07 16:37:19 +0000
commite4a1bd5b031e418a3c593c25cda5dc7996564ee7 (patch)
treef3323fd8056519b14676d5498c0c3f43f8f0d596 /src/libcryptobox/chacha20
parent088a15bf1d41164dc90794764422c96c6b0d9578 (diff)
downloadrspamd-e4a1bd5b031e418a3c593c25cda5dc7996564ee7.tar.gz
rspamd-e4a1bd5b031e418a3c593c25cda5dc7996564ee7.zip
Fix cryptobox logic.
Diffstat (limited to 'src/libcryptobox/chacha20')
-rw-r--r--src/libcryptobox/chacha20/chacha.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcryptobox/chacha20/chacha.c b/src/libcryptobox/chacha20/chacha.c
index caeba8edc..a165bea63 100644
--- a/src/libcryptobox/chacha20/chacha.c
+++ b/src/libcryptobox/chacha20/chacha.c
@@ -170,7 +170,7 @@ chacha_update (chacha_state *S, const unsigned char *in, unsigned char *out,
size_t bytes;
/* enough for at least one block? */
- if ((state->leftover + inlen) >= CHACHA_BLOCKBYTES) {
+ while ((state->leftover + inlen) >= CHACHA_BLOCKBYTES) {
/* handle the previous data */
if (state->leftover) {
bytes = (CHACHA_BLOCKBYTES - state->leftover);