Merge pull request #7806 from paul-elliott-arm/fix_32bit_builds

[Bignum] Fix 32 bit unreachable code build failure
This commit is contained in:
Gilles Peskine 2023-06-20 22:13:06 +02:00 committed by GitHub
commit a3a0025e18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5577,9 +5577,9 @@ int mbedtls_ecp_mod_p448_raw(mbedtls_mpi_uint *X, size_t X_limbs)
(void) mbedtls_mpi_core_add(X, X, Q, Q_limbs);
/* M = B0 */
if (ciL > 4) {
M[P224_WIDTH_MIN] &= ((mbedtls_mpi_uint)-1) >> (P224_UNUSED_BITS);
}
#ifdef MBEDTLS_HAVE_INT64
M[P224_WIDTH_MIN] &= ((mbedtls_mpi_uint)-1) >> (P224_UNUSED_BITS);
#endif
memset(M + P224_WIDTH_MAX, 0, ((M_limbs - P224_WIDTH_MAX) * ciL));
/* M = M + Q = B0 + B1 */