Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Frantisek Kluknavsky
60e6d8dd00 added limboverflow.patch, rhbz#1171701, rhbz#1171710, there was one less limb allocated in strtofr 2014-12-12 22:27:49 +01:00
2 changed files with 19 additions and 1 deletions

15
limboverflow.patch Normal file
View file

@ -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.

View file

@ -1,7 +1,7 @@
Summary: A C library for multiple-precision floating-point computations
Name: mpfr
Version: 3.1.2
Release: 4%{?dist}
Release: 5%{?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)
@ -84,6 +84,9 @@ fi
%{_infodir}/mpfr.info*
%changelog
* Fri Dec 12 2014 Frantisek Kluknavsky <fkluknav@redhat.com> - 3.1.2-5
- added limboverflow.patch, rhbz#1171701, rhbz#1171710, there was one less limb allocated in strtofr
* Tue Aug 06 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.1.2-4
- Install docs into unversioned docdir (Fix FTBFS RHBZ#992296).
- Append --disable-static to %%configure.