aboutsummaryrefslogtreecommitdiff
path: root/openssl/engines/ccgost/gost_crypt.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
committermarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
commiteb8e32daea99b6e3ebf134efeeba184c23817f08 (patch)
treeffbda57952ba3f40612e6409bd9a95f9a0a892dc /openssl/engines/ccgost/gost_crypt.c
parented16af1abc515d7cc3ff9c5794aef89551fe7494 (diff)
parentfef0b61e18b9c7475e4d6e67ddfc55db46573f4e (diff)
downloadvcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.gz
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.bz2
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.zip
svn merge ^/branches/released .
Diffstat (limited to 'openssl/engines/ccgost/gost_crypt.c')
-rw-r--r--openssl/engines/ccgost/gost_crypt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openssl/engines/ccgost/gost_crypt.c b/openssl/engines/ccgost/gost_crypt.c
index eb11f0e32..4977d1dcf 100644
--- a/openssl/engines/ccgost/gost_crypt.c
+++ b/openssl/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];
@@ -459,13 +459,15 @@ int gost89_get_asn1_parameters(EVP_CIPHER_CTX *ctx,ASN1_TYPE *params)
int ret = -1;
int len;
GOST_CIPHER_PARAMS *gcp = NULL;
- unsigned char *p = params->value.sequence->data;
+ unsigned char *p;
struct ossl_gost_cipher_ctx *c=ctx->cipher_data;
if (ASN1_TYPE_get(params) != V_ASN1_SEQUENCE)
{
return ret;
}
+ p = params->value.sequence->data;
+
gcp = d2i_GOST_CIPHER_PARAMS(NULL, (const unsigned char **)&p,
params->value.sequence->length);