mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-12 16:41:03 +03:00
Move the handling of the sign out of the base-specific loops. This both simplifies the code, and corrects an edge case: the code in the non-hexadecimal case depended on mbedtls_mpi_mul_int() preserving the sign bit when multiplying a "negative zero" MPI by an integer, which used to be the case but stopped with PR #2512. Fix #4295. Thanks to Guido Vranken for analyzing the cause of the bug. Credit to OSS-Fuzz. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
78 KiB
78 KiB