1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Move the overallocation test to test suites

This way the compiler does not complain about
an overly large allocation made.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek
2023-07-14 10:12:11 -04:00
parent 8ca66a0795
commit f35490e7af
3 changed files with 16 additions and 12 deletions

View File

@ -195,3 +195,15 @@ exit:
mbedtls_ssl_config_free(&conf);
}
/* END_CASE */
/* BEGIN_CASE */
void check_mbedtls_calloc_overallocation(int num, int size)
{
unsigned char *buf;
buf = mbedtls_calloc((size_t) num, (size_t) size);
TEST_ASSERT(buf == NULL);
exit:
mbedtls_free(buf);
}
/* END_CASE */