mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 17:05:42 +01:00
Fix issues in CI
This commit is contained in:
parent
77a0e07f80
commit
a1e5054d91
@ -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).
|
* The generated number will be on range [0, num).
|
||||||
*
|
*
|
||||||
* \return The generated random number.
|
* \return The generated random number.
|
||||||
*/
|
*/
|
||||||
uint32_t mbedtls_platform_random_in_range( size_t num );
|
uint32_t mbedtls_platform_random_in_range( size_t num );
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_TIME_DATE)
|
#if defined(MBEDTLS_HAVE_TIME_DATE)
|
||||||
|
@ -84,7 +84,7 @@ void mbedtls_platform_memset( void *ptr, int value, size_t num )
|
|||||||
/* Randomize start offset. */
|
/* Randomize start offset. */
|
||||||
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
|
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
|
||||||
/* Randomize data */
|
/* 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
|
/* Perform a pair of memset operations from random locations with
|
||||||
* random data */
|
* random data */
|
||||||
@ -101,7 +101,7 @@ void mbedtls_platform_memcpy( void *dst, const void *src, size_t num )
|
|||||||
/* Randomize start offset. */
|
/* Randomize start offset. */
|
||||||
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
|
size_t start_offset = (size_t) mbedtls_platform_random_in_range( num );
|
||||||
/* Randomize initial data to prevent leakage while copying */
|
/* 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 );
|
memset( (void *) dst, data, num );
|
||||||
memcpy( (void *) ( (unsigned char *) dst + start_offset ),
|
memcpy( (void *) ( (unsigned char *) dst + start_offset ),
|
||||||
|
Loading…
Reference in New Issue
Block a user