From 21d6a201ee84394da9e0373a3ec90242ae82051c Mon Sep 17 00:00:00 2001 From: Jarno Lamsa Date: Tue, 1 Oct 2019 15:20:13 +0300 Subject: [PATCH] Add missing typecast for memset --- library/platform_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/platform_util.c b/library/platform_util.c index a5ece50fc..e68a6bed9 100644 --- a/library/platform_util.c +++ b/library/platform_util.c @@ -88,7 +88,8 @@ void mbedtls_platform_memset( void *ptr, int value, size_t num ) /* Perform a pair of memset operations from random locations with * random data */ - memset( ( void * ) ( ptr + startOffset ), value, ( num - startOffset ) ); + memset( ( void * ) ( ( unsigned char * ) ptr + startOffset ), value, + ( num - startOffset ) ); memset( ( void * ) ptr, data, startOffset ); /* Perform the original memset */