Replace malloc with calloc
- platform layer currently broken (not adapted yet)
- memmory_buffer_alloc too
diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function
index 6977cfa..b9f01ad 100644
--- a/tests/suites/helpers.function
+++ b/tests/suites/helpers.function
@@ -4,7 +4,7 @@
#include <stdio.h>
#define mbedtls_printf printf
#define mbedtls_fprintf fprintf
-#define mbedtls_malloc malloc
+#define mbedtls_calloc calloc
#define mbedtls_free free
#define mbedtls_exit exit
#define mbedtls_fprintf fprintf
@@ -123,7 +123,7 @@
void *p;
size_t actual_len = ( len != 0 ) ? len : 1;
- p = mbedtls_malloc( actual_len );
+ p = mbedtls_calloc( 1, actual_len );
assert( p != NULL );
memset( p, 0x00, actual_len );
@@ -150,7 +150,7 @@
if( *olen == 0 )
return( zero_alloc( *olen ) );
- obuf = mbedtls_malloc( *olen );
+ obuf = mbedtls_calloc( 1, *olen );
assert( obuf != NULL );
(void) unhexify( obuf, ibuf );