mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 22:01:03 +00:00
Zeroize stack before returning from mpi_fill_random
This commit is contained in:
parent
b3088b4b37
commit
0f49bbc1fc
|
@ -1881,6 +1881,7 @@ int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
|
||||||
MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( X, buf, size ) );
|
MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( X, buf, size ) );
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
mbedtls_zeroize( buf, sizeof( buf ) );
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue