summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/bio_asn1.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-03-06 21:26:46 +0100
committerFdaSilvaYY <fdasilvayy@gmail.com>2016-05-29 01:36:11 +0200
commit8e89e85f556f549f05d3b49f5408a217ac5e3700 (patch)
treea85bd926047f78b5b77d5043dcffaa2172cf4b4c /crypto/asn1/bio_asn1.c
parent8640f21093ae02c838e183f04ea52f781b5c98d6 (diff)
Fix some missing inits
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/997)
Diffstat (limited to 'crypto/asn1/bio_asn1.c')
-rw-r--r--crypto/asn1/bio_asn1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c
index 664b682726..f3d4776d72 100644
--- a/crypto/asn1/bio_asn1.c
+++ b/crypto/asn1/bio_asn1.c
@@ -96,6 +96,7 @@ const BIO_METHOD *BIO_f_asn1(void)
static int asn1_bio_new(BIO *b)
{
BIO_ASN1_BUF_CTX *ctx;
+
ctx = OPENSSL_malloc(sizeof(*ctx));
if (ctx == NULL)
return 0;
@@ -120,10 +121,12 @@ static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size)
ctx->copylen = 0;
ctx->asn1_class = V_ASN1_UNIVERSAL;
ctx->asn1_tag = V_ASN1_OCTET_STRING;
- ctx->ex_buf = 0;
- ctx->ex_pos = 0;
+ ctx->ex_buf = NULL;
ctx->ex_len = 0;
+ ctx->ex_pos = 0;
ctx->state = ASN1_STATE_START;
+ ctx->prefix = ctx->prefix_free = ctx->suffix = ctx->suffix_free = NULL;
+ ctx->ex_arg = NULL;
return 1;
}