1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Fix a few unchecked value issue

Signed-off-by: Chien Wong <m@xv97.com>
This commit is contained in:
Chien Wong
2023-08-01 21:38:46 +08:00
parent cbc495eb0f
commit e2caf4161b
3 changed files with 5 additions and 5 deletions

View File

@ -1706,7 +1706,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
*/
const size_t x_index = 0;
mbedtls_mpi_init(&W[x_index]);
mbedtls_mpi_copy(&W[x_index], X);
MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[x_index], X));
j = N->n + 1;
/* All W[i] and X must have at least N->n limbs for the mpi_montmul()
@ -1893,7 +1893,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
/*
* Load the result in the output variable.
*/
mbedtls_mpi_copy(X, &W[x_index]);
MBEDTLS_MPI_CHK(mbedtls_mpi_copy(X, &W[x_index]));
cleanup: