summaryrefslogtreecommitdiffstats
path: root/engines/ccgost
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-04-14 00:33:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-04-14 00:33:22 +0000
commit5daa9411a0d4953ff38e59f37f45dc5178b635cf (patch)
treed0329d9024c9acf1dc8040a19bd766fa87d01b96 /engines/ccgost
parent094d4019b8ccd3deab667bf0b0d8f10074347a79 (diff)
fix bug in ccgost CFB mode code
Diffstat (limited to 'engines/ccgost')
-rw-r--r--engines/ccgost/gost_crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c
index 44f4e49bc9..4977d1dcf5 100644
--- a/engines/ccgost/gost_crypt.c
+++ b/engines/ccgost/gost_crypt.c
@@ -299,7 +299,7 @@ int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
if (i<inl)
{
gost_crypt_mesh(ctx->cipher_data,ctx->iv,ctx->buf);
- if (!ctx->encrypt) memcpy(ctx->buf+8,in_ptr,j);
+ if (!ctx->encrypt) memcpy(ctx->buf+8,in_ptr,inl-i);
for (j=0;i<inl;j++,i++)
{
out_ptr[j]=ctx->buf[j]^in_ptr[j];