Add a reserve call to the stack data structure.
authorPauli <paul.dale@oracle.com>
Thu, 17 Aug 2017 00:10:07 +0000 (10:10 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 27 Sep 2017 20:53:40 +0000 (06:53 +1000)
commit1b3e2bbf64b96f636277ca29b31ba152c1831e74
tree10a9f89306c04e3133f5e9c231e6aa4aa2a8841a
parent9f9442918aeaed5dc2442d81ab8d29fe3e1fb906
Add a reserve call to the stack data structure.

This allows the caller to guarantee that there is sufficient space for a
number of insertions without reallocation.

The expansion ratio when reallocating the array is reduced to 1.5 rather than 2.

Change bounds testing to use a single size rather than both INT_MAX and
SIZE_MAX.  This simplifies some of the tests.

Switch the stack pointers to data from char * to void *

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4386)
crypto/stack/stack.c
doc/man3/DEFINE_STACK_OF.pod
include/openssl/safestack.h
include/openssl/stack.h
test/sanitytest.c
test/stack_test.c
util/libcrypto.num