diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-04-02 13:45:14 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-04-10 19:52:02 +0100 |
commit | 6df777ed508ca785b31d6e92e73961ac282ab3ea (patch) | |
tree | 4ea38f791dd218d25a275a77ada3e36c4045bdb6 /crypto/asn1 | |
parent | 07395b7a6dfdbe263677e58519f1d11d51d31da5 (diff) |
Don't set *pval to NULL in ASN1_item_ex_new.
While *pval is usually a pointer in rare circumstances it can be a long
value. One some platforms (e.g. WIN64) where
sizeof(long) < sizeof(ASN1_VALUE *) this will write past the field.
*pval is initialised correctly in the rest of ASN1_item_ex_new so setting it
to NULL is unecessary anyway.
Thanks to Julien Kauffmann for reporting this issue.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit f617b4969a9261b9d7d381670aefbe2cf766a2cb)
Conflicts:
crypto/asn1/tasn_new.c
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/tasn_new.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index 7d2964f023..b0c73beeb5 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -100,9 +100,6 @@ static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, else asn1_cb = 0; - if (!combine) - *pval = NULL; - #ifdef CRYPTO_MDEBUG if (it->sname) CRYPTO_push_info(it->sname); |