mbedtls: memset, cf 996ed197fb

This commit is contained in:
Philippe Teuwen 2021-05-14 11:07:47 +02:00
commit ec8ec893c6

View file

@ -62,13 +62,13 @@
* mbedtls_platform_zeroize() to use a suitable implementation for their * mbedtls_platform_zeroize() to use a suitable implementation for their
* platform and needs. * platform and needs.
*/ */
static void *(* const volatile memset_func)(void *, int, size_t) = memset; //static void *(* const volatile memset_func)(void *, int, size_t) = memset;
void mbedtls_platform_zeroize(void *buf, size_t len) { void mbedtls_platform_zeroize(void *buf, size_t len) {
MBEDTLS_INTERNAL_VALIDATE(len == 0 || buf != NULL); MBEDTLS_INTERNAL_VALIDATE(len == 0 || buf != NULL);
if (len > 0) if (len > 0)
memset_func(buf, 0, len); memset(buf, 0, len);
} }
#endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */ #endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */