mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-31 23:39:55 +00:00
Add checks to guarantee positive input parameters
Signed-off-by: Gabor Mezei <[email protected]>
This commit is contained in:
@@ -1378,6 +1378,9 @@ void ecp_mod_p192k1(char *input_N,
|
||||
limbs_X = X.n;
|
||||
limbs_N = N.n;
|
||||
limbs_res = res.n;
|
||||
TEST_ASSERT(mbedtls_mpi_core_uint_le_mpi(0, X.p, X.n));
|
||||
TEST_ASSERT(mbedtls_mpi_core_uint_le_mpi(0, N.p, N.n));
|
||||
TEST_ASSERT(mbedtls_mpi_core_uint_le_mpi(0, res.p, res.n));
|
||||
|
||||
size_t limbs = limbs_N;
|
||||
size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
|
||||
|
||||
Reference in New Issue
Block a user