summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/ex_data.c
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@ohtsu.org>2017-11-03 00:22:35 +0900
committerMyles Borins <mylesborins@google.com>2017-11-03 12:22:29 -0500
commite7fff9c4435f9f5ef8069217d2a0093c81a8c78b (patch)
tree45fbbf4aae64902b831501231d16b7a0af2aeb53 /deps/openssl/openssl/crypto/ex_data.c
parent3d4d5e0c60f00693947c940b09249f3952bb0cdc (diff)
downloadandroid-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.tar.gz
android-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.tar.bz2
android-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.zip
deps: upgrade openssl sources to 1.0.2m
This replaces all sources of openssl-1.0.2m.tar.gz into deps/openssl/openssl PR-URL: https://github.com/nodejs/node/pull/16691 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/openssl/openssl/crypto/ex_data.c')
-rw-r--r--deps/openssl/openssl/crypto/ex_data.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/deps/openssl/openssl/crypto/ex_data.c b/deps/openssl/openssl/crypto/ex_data.c
index 108a1959ea..723b21b3d2 100644
--- a/deps/openssl/openssl/crypto/ex_data.c
+++ b/deps/openssl/openssl/crypto/ex_data.c
@@ -473,7 +473,14 @@ static int int_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
if (j < mx)
mx = j;
if (mx > 0) {
- if (!CRYPTO_set_ex_data(to, mx - 1, NULL))
+ /*
+ * Make sure the ex_data stack is at least |mx| elements long to avoid
+ * issues in the for loop that follows; so go get the |mx|'th element
+ * (if it does not exist CRYPTO_get_ex_data() returns NULL), and assign
+ * to itself. This is normally a no-op; but ensures the stack is the
+ * proper size
+ */
+ if (!CRYPTO_set_ex_data(to, mx - 1, CRYPTO_get_ex_data(to, mx - 1)))
goto skip;
storage = OPENSSL_malloc(mx * sizeof(CRYPTO_EX_DATA_FUNCS *));
if (!storage)