From 1137fa3905a5b936a92d30e9ac653323f47d5873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 27 Aug 2021 15:17:38 +0200 Subject: [PATCH] Fix segfaults on s390x with rubygem-acitvestorage test suite. Resolves: rhbz#1993193 --- ...ved-swapping-to-the-correct-position.patch | 31 +++++++++++++++++++ ImageMagick.spec | 13 +++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 ImageMagick-6.9.11-42-Moved-swapping-to-the-correct-position.patch diff --git a/ImageMagick-6.9.11-42-Moved-swapping-to-the-correct-position.patch b/ImageMagick-6.9.11-42-Moved-swapping-to-the-correct-position.patch new file mode 100644 index 0000000..36379ef --- /dev/null +++ b/ImageMagick-6.9.11-42-Moved-swapping-to-the-correct-position.patch @@ -0,0 +1,31 @@ +From 112051a709f83f13ca2b9ab63007d4a41b0a9beb Mon Sep 17 00:00:00 2001 +From: Dirk Lemstra +Date: Sun, 22 Nov 2020 18:11:37 +0100 +Subject: [PATCH] Moved swapping to the correct position. + +--- + coders/tiff.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/coders/tiff.c b/coders/tiff.c +index dba08138c8..fff2e79d4c 100644 +--- a/coders/tiff.c ++++ b/coders/tiff.c +@@ -640,12 +640,13 @@ static MagickBooleanType TIFFGetProfiles(TIFF *tiff,Image *image) + { + const TIFFField + *field; +- +- if (TIFFIsByteSwapped(tiff) != 0) +- TIFFSwabArrayOfLong((uint32 *) profile,(size_t) length); + field=TIFFFieldWithTag(tiff,TIFFTAG_RICHTIFFIPTC); + if (TIFFFieldDataType(field) == TIFF_LONG) +- status=ReadProfile(image,"iptc",profile,4L*length); ++ { ++ if (TIFFIsByteSwapped(tiff) != 0) ++ TIFFSwabArrayOfLong((uint32 *) profile,(size_t) length); ++ status=ReadProfile(image,"iptc",profile,4L*length); ++ } + else + status=ReadProfile(image,"iptc",profile,length); + } diff --git a/ImageMagick.spec b/ImageMagick.spec index 635c25c..07542ea 100644 --- a/ImageMagick.spec +++ b/ImageMagick.spec @@ -10,13 +10,18 @@ Epoch: 1 Epoch: 0 %endif Version: %{VER}.%{Patchlevel} -Release: 7%{?dist} +Release: 8%{?dist} Summary: An X application for displaying and manipulating images License: ImageMagick Url: http://www.imagemagick.org/ Source0: https://www.imagemagick.org/download/%{name}-%{VER}-%{Patchlevel}.tar.xz +# Fix segfaults on s390x with rubygem-acitvestorage test suite. +# https://bugzilla.redhat.com/show_bug.cgi?id=1993193 +# https://github.com/ImageMagick/ImageMagick6/commit/112051a709f83f13ca2b9ab63007d4a41b0a9beb +Patch0: ImageMagick-6.9.11-42-Moved-swapping-to-the-correct-position.patch + BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1 BuildRequires: perl-generators @@ -148,6 +153,8 @@ however. %prep %setup -q -n %{name}-%{VER}-%{Patchlevel} +%patch0 -p1 + # for %%doc mkdir Magick++/examples cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples @@ -318,6 +325,10 @@ rm PerlMagick/demo/Generic.ttf %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt %changelog +* Fri Aug 27 2021 Vít Ondruch - 1:6.9.11.27-8 +- Fix segfaults on s390x with rubygem-acitvestorage test suite. + Resolves: rhbz#1993193 + * Sun Aug 22 2021 Richard Shaw - 1:6.9.11.27-7 - Rebuild for OpenEXR/Imath 3.1.