From 423cebe21ccb931567a42951d25864b44fd2d191 Mon Sep 17 00:00:00 2001 From: Frantisek Kluknavsky Date: Fri, 12 Dec 2014 22:04:07 +0100 Subject: [PATCH] added limboverflow.patch, rhbz#1171701, rhbz#1171710, there was one less limb allocated in strtofr --- limboverflow.patch | 15 +++++++++++++++ mpfr.spec | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 limboverflow.patch diff --git a/limboverflow.patch b/limboverflow.patch new file mode 100644 index 0000000..95232c5 --- /dev/null +++ b/limboverflow.patch @@ -0,0 +1,15 @@ +--- mpfr-3.1.2-a/src/strtofr.c 2013-03-13 15:37:32.000000000 +0000 ++++ mpfr-3.1.2-b/src/strtofr.c 2014-12-04 01:41:57.287791246 +0000 +@@ -473,8 +473,10 @@ + /* prec bits corresponds to ysize limbs */ + ysize_bits = ysize * GMP_NUMB_BITS; + /* and to ysize_bits >= prec > MPFR_PREC (x) bits */ +- y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 1); +- y += ysize; /* y has (ysize+1) allocated limbs */ ++ /* we need to allocate one more limb to work around bug ++ https://gmplib.org/list-archives/gmp-bugs/2013-December/003267.html */ ++ y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 2); ++ y += ysize; /* y has (ysize+2) allocated limbs */ + + /* pstr_size is the number of characters we read in pstr->mant + to have at least ysize full limbs. diff --git a/mpfr.spec b/mpfr.spec index 4afcf63..6a4a0b5 100644 --- a/mpfr.spec +++ b/mpfr.spec @@ -1,7 +1,7 @@ Summary: A C library for multiple-precision floating-point computations Name: mpfr Version: 3.1.2 -Release: 7%{?dist} +Release: 8%{?dist} URL: http://www.mpfr.org/ Source0: http://www.mpfr.org/mpfr-current/%{name}-%{version}.tar.xz # GFDL (mpfr.texi, mpfr.info and fdl.texi) @@ -87,7 +87,7 @@ fi %{_infodir}/mpfr.info* %changelog -* Fri Dec 12 2014 Frantisek Kluknavsky - 3.1.2-7 +* Fri Dec 12 2014 Frantisek Kluknavsky - 3.1.2-8 - added limboverflow.patch, rhbz#1171701, rhbz#1171710, there was one less limb allocated in strtofr * Sun Aug 17 2014 Fedora Release Engineering - 3.1.2-6