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:50:51 +0100 |
commit | f617b4969a9261b9d7d381670aefbe2cf766a2cb (patch) | |
tree | 6091c0430c8ee1ab1c1c20ad851579da657998a0 /crypto/asn1/tasn_new.c | |
parent | 9fdbc9df76a68a30df349c53f1ceeb915f82948c (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>
Diffstat (limited to 'crypto/asn1/tasn_new.c')
-rw-r--r-- | crypto/asn1/tasn_new.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index 1b36ecc149..aeced95232 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -94,8 +94,6 @@ int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it) else asn1_cb = 0; - *pval = NULL; - #ifdef CRYPTO_MDEBUG if (it->sname) CRYPTO_push_info(it->sname); |