diff options
author | Pauli <paul.dale@oracle.com> | 2017-09-19 08:48:14 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-09-28 06:53:40 +1000 |
commit | e431363f8c241abd0dfe9b83dfc1cec1bdfe13ab (patch) | |
tree | 1f4d44a49ed133216ac06b19d8e9b3c37e0b6b3c /crypto/async/async.c | |
parent | 1b3e2bbf64b96f636277ca29b31ba152c1831e74 (diff) |
Add stack space reservations.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4386)
Diffstat (limited to 'crypto/async/async.c')
-rw-r--r-- | crypto/async/async.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/async/async.c b/crypto/async/async.c index 1359b5061a..7678b489b3 100644 --- a/crypto/async/async.c +++ b/crypto/async/async.c @@ -342,6 +342,8 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) OPENSSL_free(pool); return 0; } + if (!sk_ASYNC_JOB_reserve(pool->jobs, init_size)) + goto err; pool->max_size = max_size; @@ -358,7 +360,7 @@ int ASYNC_init_thread(size_t max_size, size_t init_size) break; } job->funcargs = NULL; - sk_ASYNC_JOB_push(pool->jobs, job); + sk_ASYNC_JOB_push(pool->jobs, job); /* Cannot fail due to reserve */ curr_size++; } pool->curr_size = curr_size; |