aboutsummaryrefslogtreecommitdiff
path: root/gost_crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gost_crypt.c')
-rw-r--r--gost_crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gost_crypt.c b/gost_crypt.c
index c7c8caa..08a82a9 100644
--- a/gost_crypt.c
+++ b/gost_crypt.c
@@ -549,7 +549,7 @@ int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
}
- for (; i + 8 < inl; i += 8, in_ptr += 8, out_ptr += 8) {
+ for (; (inl - i) >= 8; i += 8, in_ptr += 8, out_ptr += 8) {
/*
* block cipher current iv
*/
@@ -610,7 +610,7 @@ static int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
}
- for (; i + 8 < inl; i += 8, in_ptr += 8, out_ptr += 8) {
+ for (; (inl - i) >= 8; i += 8, in_ptr += 8, out_ptr += 8) {
/*
* block cipher current iv
*/