Added submodule contents into tree

This commit is contained in:
darktux
2024-04-05 01:58:27 +02:00
parent 01a752555c
commit 9b991208cd
4934 changed files with 1657477 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
/* mbedtls_config.h modifier that forces calloc(0) to return NULL.
* Used for testing.
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#include <stdlib.h>
#ifndef MBEDTLS_PLATFORM_STD_CALLOC
static inline void *custom_calloc(size_t nmemb, size_t size)
{
if (nmemb == 0 || size == 0) {
return NULL;
}
return calloc(nmemb, size);
}
#define MBEDTLS_PLATFORM_MEMORY
#define MBEDTLS_PLATFORM_STD_CALLOC custom_calloc
#endif