From fd4fab0b247c0ba34c3e5b62c7decd30d2009d32 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 9 Apr 2021 17:11:34 +0200 Subject: [PATCH 1/2] mbedtls_mpi_read_string("-0") no longer produces a "negative zero" Signed-off-by: Gilles Peskine --- ChangeLog.d/mpi_read_negative_zero.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog.d/mpi_read_negative_zero.txt diff --git a/ChangeLog.d/mpi_read_negative_zero.txt b/ChangeLog.d/mpi_read_negative_zero.txt new file mode 100644 index 000000000..f540fbfa9 --- /dev/null +++ b/ChangeLog.d/mpi_read_negative_zero.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix mbedtls_mpi_read_string on "-0" returning a ``negative zero'' object, + which the library does fully consistently treat as equal to zero. From 8f28c24b4adca6bdda2d5fb1f7c6f533fa05d431 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 9 Apr 2021 20:20:26 +0200 Subject: [PATCH 2/2] Explain the problem in more concrete terms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't try to make the reader guess what a “negative zero” might mean. Signed-off-by: Gilles Peskine --- ChangeLog.d/mpi_read_negative_zero.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.d/mpi_read_negative_zero.txt b/ChangeLog.d/mpi_read_negative_zero.txt index f540fbfa9..e338de70b 100644 --- a/ChangeLog.d/mpi_read_negative_zero.txt +++ b/ChangeLog.d/mpi_read_negative_zero.txt @@ -1,3 +1,3 @@ Bugfix - * Fix mbedtls_mpi_read_string on "-0" returning a ``negative zero'' object, - which the library does fully consistently treat as equal to zero. + * mbedtls_mpi_read_string on "-0" produced an MPI object that was not treated + as equal to 0 in all cases. Fix it to produce the same object as "0".