mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 11:11:08 +01:00
committed by
Gilles Peskine
parent
8b6068b69a
commit
9d54f37330
@@ -1254,10 +1254,10 @@ static mbedtls_mpi_uint mbedtls_int_div_int(mbedtls_mpi_uint u1,
|
||||
*/
|
||||
if (0 == d || u1 >= d) {
|
||||
if (r != NULL) {
|
||||
*r = ~0;
|
||||
*r = ~(mbedtls_mpi_uint) 0u;
|
||||
}
|
||||
|
||||
return ~0;
|
||||
return ~(mbedtls_mpi_uint) 0u;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_HAVE_UDBL)
|
||||
@@ -1403,7 +1403,7 @@ int mbedtls_mpi_div_mpi(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
|
||||
|
||||
for (i = n; i > t; i--) {
|
||||
if (X.p[i] >= Y.p[t]) {
|
||||
Z.p[i - t - 1] = ~0;
|
||||
Z.p[i - t - 1] = ~(mbedtls_mpi_uint) 0u;
|
||||
} else {
|
||||
Z.p[i - t - 1] = mbedtls_int_div_int(X.p[i], X.p[i - 1],
|
||||
Y.p[t], NULL);
|
||||
|
||||
Reference in New Issue
Block a user