af601f9751
When x is the most negative value of a two's complement type, `(unsigned_type)(-x)` has undefined behavior, whereas `-(unsigned_type)x` has well-defined behavior and does what was intended. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
4 lines
191 B
Text
4 lines
191 B
Text
Bugfix
|
|
* Fix undefined behavior (typically harmless in practice) when some bignum
|
|
functions receive the most negative value of mbedtls_mpi_sint. Credit
|
|
to OSS-Fuzz. Fixes #6597.
|