Commit f792c663 authored by FdaSilvaYY's avatar FdaSilvaYY Committed by Rich Salz
Browse files

Fix some missing inits



Backport of 8e89e85f
From PR #1019 / #997

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1019)
parent fd785ca8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -250,6 +250,7 @@ int ASN1_STRING_TABLE_add(int nid,
        }
        tmp->flags = flags | STABLE_FLAGS_MALLOC;
        tmp->nid = nid;
        tmp->minsize = tmp->maxsize = -1;
        new_nid = 1;
    } else
        tmp->flags = (tmp->flags & STABLE_FLAGS_MALLOC) | flags;
+4 −2
Original line number Diff line number Diff line
@@ -170,10 +170,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;
}

+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it)
    ndef_aux->ndef_bio = sarg.ndef_bio;
    ndef_aux->boundary = sarg.boundary;
    ndef_aux->out = out;
    ndef_aux->derbuf = NULL;

    BIO_ctrl(asn_bio, BIO_C_SET_EX_ARG, 0, ndef_aux);

+4 −0
Original line number Diff line number Diff line
@@ -149,9 +149,13 @@ static int bio_new(BIO *bio)
        return 0;

    b->peer = NULL;
    b->closed = 0;
    b->len = 0;
    b->offset = 0;
    /* enough for one TLS record (just a default) */
    b->size = 17 * 1024;
    b->buf = NULL;
    b->request = 0;

    bio->ptr = b;
    return 1;