From 006848db2aff04c4914e3f3ffbceedc095515750 Mon Sep 17 00:00:00 2001 From: Azim Khan Date: Fri, 23 Mar 2018 18:34:35 +0000 Subject: [PATCH] Use correct version of snprintf on Windows platform.h defines MBEDTLS_PLATFORM_STD_SNPRINTF based on _WIN32. But while defining macro mbedtls_snprintf it sets it to STD C snprintf that is deprecated on Windows. --- include/mbedtls/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index bdf771ce5..5f7b0f274 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -181,7 +181,7 @@ int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) #define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO #else -#define mbedtls_snprintf snprintf +#define mbedtls_snprintf MBEDTLS_PLATFORM_STD_SNPRINTF #endif /* MBEDTLS_PLATFORM_SNPRINTF_MACRO */ #endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */