Fix issues in CI

This commit is contained in:
Jarno Lamsa 2019-10-02 12:44:36 +03:00
parent 77a0e07f80
commit a1e5054d91
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ int mbedtls_platform_memcmp( const void *buf1, const void *buf2, size_t num );
* The generated number will be on range [0, num).
*
* \return The generated random number.
*/
*/
uint32_t mbedtls_platform_random_in_range( size_t num );
#if defined(MBEDTLS_HAVE_TIME_DATE)

View File

@ -84,7 +84,7 @@ void mbedtls_platform_memset( void *ptr, int value, size_t num )
/* Randomize start offset. */
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
/* Randomize data */
size_t data = (size_t) mbedtls_platform_random_in_range( 256 );
uint32_t data = mbedtls_platform_random_in_range( 256 );
/* Perform a pair of memset operations from random locations with
* random data */
@ -101,7 +101,7 @@ void mbedtls_platform_memcpy( void *dst, const void *src, size_t num )
/* Randomize start offset. */
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
/* Randomize initial data to prevent leakage while copying */
size_t data = (size_t) mbedtls_platform_random_in_range( 256 );
uint32_t data = mbedtls_platform_random_in_range( 256 );
memset( (void *) dst, data, num );
memcpy( (void *) ( (unsigned char *) dst + start_offset ),