summaryrefslogtreecommitdiffstats
path: root/engines/ccgost
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-04-14 00:30:12 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-04-14 00:30:12 +0000
commit094d4019b8ccd3deab667bf0b0d8f10074347a79 (patch)
tree1131bca3a7ec1f186c173f5e8d9cf6e01e46445a /engines/ccgost
parent1507f3abba28f333ed5d1bd200e5ee82b2c7f16a (diff)
check ASN1 type before using it
Diffstat (limited to 'engines/ccgost')
-rw-r--r--engines/ccgost/gost_crypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c
index eb11f0e328..44f4e49bc9 100644
--- a/engines/ccgost/gost_crypt.c
+++ b/engines/ccgost/gost_crypt.c
@@ -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);