1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-05-30 04:04:51 +03:00
Gilles Peskine 581c460161 Fix negative zero created by (-A) + (+A) or (-A) - (-A)
In mbedtls_mpi_add_mpi() and mbedtls_mpi_sub_mpi(), and by extention
mbedtls_mpi_add_int() and mbedtls_mpi_sub_int(), when the resulting value
was zero, the sign bit of the result was incorrectly set to -1 when the
left-hand operand was negative. This is not a valid mbedtls_mpi
representation. Fix this: always set the sign to +1 when the result is 0.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-10 15:15:25 +01:00
..
2022-10-25 16:47:56 +01:00
2022-10-25 16:47:56 +01:00
2022-07-11 10:43:55 +01:00
2022-10-25 16:47:56 +01:00
2022-05-09 11:03:26 +02:00
2022-10-07 15:47:39 +02:00
2021-12-15 11:55:31 +00:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-12-13 11:14:45 +00:00
2020-11-25 13:10:50 +01:00
2020-11-25 13:10:50 +01:00
2022-10-25 17:20:00 +01:00
2022-10-27 11:38:15 +01:00
2022-03-29 17:56:55 +02:00