diff options
author | Pauli <paul.dale@oracle.com> | 2020-02-05 09:09:29 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-02-05 09:09:29 +1000 |
commit | 34b167625af50a13b8414e11814a795457cb17b0 (patch) | |
tree | 267626b384a898eda7e749bb992fefca36a2e64b /test | |
parent | e3b1ccad694aabfffbde68c56fb8d44c011f98b1 (diff) |
Make minimum size for secure memory a size_t.
The minimum size argument to CRYPTO_secure_malloc_init() was an int but ought
to be a size_t since it is a size.
From an API perspective, this is a change. However, the minimum size is
verified as being a positive power of two and it will typically be a small
constant.
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from #11003)
Diffstat (limited to 'test')
-rw-r--r-- | test/secmemtest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/secmemtest.c b/test/secmemtest.c index abee4178a8..edd88b1535 100644 --- a/test/secmemtest.c +++ b/test/secmemtest.c @@ -92,7 +92,7 @@ static int test_sec_mem(void) * elements was 1<<31, as |int i| was set to that, which is a * negative number. However, it requires minimum input values: * - * CRYPTO_secure_malloc_init((size_t)1<<34, (size_t)1<<4); + * CRYPTO_secure_malloc_init((size_t)1<<34, 1<<4); * * Which really only works on 64-bit systems, since it took 16 GB * secure memory arena to trigger the problem. It naturally takes @@ -113,7 +113,7 @@ static int test_sec_mem(void) */ if (sizeof(size_t) > 4) { TEST_info("Possible infinite loop: 1<<31 limit"); - if (TEST_true(CRYPTO_secure_malloc_init((size_t)1<<34, (size_t)1<<4) != 0)) + if (TEST_true(CRYPTO_secure_malloc_init((size_t)1<<34, 1<<4) != 0)) TEST_true(CRYPTO_secure_malloc_done()); } # endif |