summaryrefslogtreecommitdiffstats
path: root/thirdparty/mbedtls/library/bignum.c
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-07-18 14:48:00 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-07-18 14:58:08 +0200
commit9403a68853784e542bbff51a84e6dc5c89241d2b (patch)
treea0d2f80fc094f281648de9122138e8bebd51ab40 /thirdparty/mbedtls/library/bignum.c
parent73a67f93092239fa35adda4675187549f9c1f903 (diff)
downloadredot-engine-9403a68853784e542bbff51a84e6dc5c89241d2b.tar.gz
Bump mbedtls to version 2.18.1, update LICENSE.
Keep applying windows entropy patch. Update thirdparty/README with correct version information.
Diffstat (limited to 'thirdparty/mbedtls/library/bignum.c')
-rw-r--r--thirdparty/mbedtls/library/bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thirdparty/mbedtls/library/bignum.c b/thirdparty/mbedtls/library/bignum.c
index 62e7f76727..32578e2c68 100644
--- a/thirdparty/mbedtls/library/bignum.c
+++ b/thirdparty/mbedtls/library/bignum.c
@@ -1829,7 +1829,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_
/*
* handle trivial cases
*/
- if( b == 1 )
+ if( b == 1 || A->n == 0 )
{
*r = 0;
return( 0 );
@@ -2317,7 +2317,7 @@ int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B
* TA-TB is even so the division by 2 has an integer result.
* Invariant (I) is preserved since any odd divisor of both TA and TB
* also divides |TA-TB|/2, and any odd divisor of both TA and |TA-TB|/2
- * also divides TB, and any odd divisior of both TB and |TA-TB|/2 also
+ * also divides TB, and any odd divisor of both TB and |TA-TB|/2 also
* divides TA.
*/
if( mbedtls_mpi_cmp_mpi( &TA, &TB ) >= 0 )