From fe2d61203fa21539f492741990ffcd8a8ef82411 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Mon, 2 Oct 2017 15:07:17 +0200 Subject: [PATCH] backported fix for hcompress --- cfitsio-fix-hcompress-overflow.patch | 12 ++++++++++++ cfitsio.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cfitsio-fix-hcompress-overflow.patch diff --git a/cfitsio-fix-hcompress-overflow.patch b/cfitsio-fix-hcompress-overflow.patch new file mode 100644 index 0000000..64a5479 --- /dev/null +++ b/cfitsio-fix-hcompress-overflow.patch @@ -0,0 +1,12 @@ +diff -Naur cfitsio/imcompress.c cfitsio.new/imcompress.c +--- cfitsio/imcompress.c 2013-11-22 21:37:42.000000000 +0100 ++++ cfitsio.new/imcompress.c 2017-10-02 14:59:15.109929047 +0200 +@@ -6315,7 +6315,7 @@ + */ + + if ((infptr->Fptr)->compress_type == HCOMPRESS_1) { +- if (*status == NUM_OVERFLOW) *status = 0; ++ if ((*status == NUM_OVERFLOW) || (*status == OVERFLOW_ERR)) *status = 0; + } + } + else if (tiledatatype == TSHORT) diff --git a/cfitsio.spec b/cfitsio.spec index 2296c24..9ed8800 100644 --- a/cfitsio.spec +++ b/cfitsio.spec @@ -1,6 +1,6 @@ Name: cfitsio Version: 3.370 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Library for manipulating FITS data files Group: Development/Libraries License: MIT @@ -12,6 +12,8 @@ Patch0: cfitsio-zlib.patch Patch1: cfitsio-noversioncheck.patch # Some rearrangements in pkg-config file Patch2: cfitsio-pkgconfig.patch +# Backported fix for hcompress +Patch3: cfitsio-fix-hcompress-overflow.patch BuildRequires: gcc-gfortran zlib-devel BuildRequires: bzip2-devel @@ -80,6 +82,7 @@ compression algorithm. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # remove bundled zlib # not all the files inside zlib belong to zlib @@ -142,6 +145,9 @@ chmod 755 %{buildroot}%{_bindir}/f{,un}pack %{_bindir}/funpack %changelog +* Mon Oct 02 2017 Christian Dersch - 3.370-10 +- Fix hcompress + * Wed Aug 02 2017 Fedora Release Engineering - 3.370-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild