Fix buffer initalisation

Initialise the buffer tail with random data instead of
given value.
This commit is contained in:
Jarno Lamsa 2019-10-02 08:25:57 +03:00
parent f5ebe2a7ce
commit 32db938463

View File

@ -88,7 +88,7 @@ void mbedtls_platform_memset( void *ptr, int value, size_t num )
/* Perform a pair of memset operations from random locations with /* Perform a pair of memset operations from random locations with
* random data */ * random data */
memset( (void *) ( (unsigned char *) ptr + start_offset ), value, memset( (void *) ( (unsigned char *) ptr + start_offset ), data,
( num - start_offset ) ); ( num - start_offset ) );
memset( (void *) ptr, data, start_offset ); memset( (void *) ptr, data, start_offset );