mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-13 23:34:08 +02:00
Add a workaround for max test suite parameter sizes
int isn't enough for SIZE_MAX/2. Hardcoding the value will make the compilers complain. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
@@ -200,7 +200,7 @@ exit:
|
||||
void check_mbedtls_calloc_overallocation(int num, int size)
|
||||
{
|
||||
unsigned char *buf;
|
||||
buf = mbedtls_calloc((size_t) num, (size_t) size);
|
||||
buf = mbedtls_calloc((size_t) num * SIZE_MAX/2, (size_t) size * SIZE_MAX/2);
|
||||
/* Dummy usage of the pointer to prevent optimizing it */
|
||||
mbedtls_printf("calloc pointer : %p\n", buf);
|
||||
TEST_ASSERT(buf == NULL);
|
||||
|
||||
Reference in New Issue
Block a user