NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/51283: Logical error in mpfr vasprintf.c
>Number: 51283
>Category: toolchain
>Synopsis: Logical error in mpfr vasprintf.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 27 07:50:00 +0000 2016
>Originator: Henning Petersen
>Release: Netbsd-current
>Organization:
>Environment:
>Description:
Logical error.
The mpfr bug was fixed in mpfr's trunk (r8705).
Report: (https://sympa.inria.fr/sympa/arc/mpfr/2013-11/msg00009.html)
>How-To-Repeat:
>Fix:
diff -u -p -r1.1.1.1 vasprintf.c
--- external/lgpl3/mpfr/dist/src/vasprintf.c 28 Nov 2013 12:30:54 -0000 1.1.1.1
+++ external/lgpl3/mpfr/dist/src/vasprintf.c 27 Jun 2016 07:00:34 -0000
@@ -1559,7 +1559,7 @@ partition_number (struct number_parts *n
/* fractional part */
{
np->point = MPFR_DECIMAL_POINT;
- np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ?
+ np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ?
spec.prec - 1 : spec.prec;
}
else if (spec.alt)
Home |
Main Index |
Thread Index |
Old Index