mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
@@ -1628,7 +1628,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
|
|||||||
* Allocate working memory for mbedtls_mpi_core_exp_mod()
|
* Allocate working memory for mbedtls_mpi_core_exp_mod()
|
||||||
*/
|
*/
|
||||||
size_t T_limbs = mbedtls_mpi_core_exp_mod_working_limbs(N->n, E->n);
|
size_t T_limbs = mbedtls_mpi_core_exp_mod_working_limbs(N->n, E->n);
|
||||||
mbedtls_mpi_uint *T = (mbedtls_mpi_uint*) mbedtls_calloc(T_limbs, sizeof(mbedtls_mpi_uint));
|
mbedtls_mpi_uint *T = (mbedtls_mpi_uint *) mbedtls_calloc(T_limbs, sizeof(mbedtls_mpi_uint));
|
||||||
if (T == NULL) {
|
if (T == NULL) {
|
||||||
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
|
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user