#4 Fix segfaults on s390x with rubygem-acitvestorage test suite.
Merged 2 years ago by vondruch. Opened 2 years ago by vondruch.
rpms/ vondruch/ImageMagick s390x-activestorage-segfault  into  rawhide

@@ -0,0 +1,31 @@ 

+ From 112051a709f83f13ca2b9ab63007d4a41b0a9beb Mon Sep 17 00:00:00 2001

+ From: Dirk Lemstra <dirk@lemstra.org>

+ 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);

+      }

file modified
+12 -1
@@ -10,13 +10,18 @@ 

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

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

  %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt

  

  %changelog

+ * Fri Aug 27 2021 Vít Ondruch <vondruch@redhat.com> - 1:6.9.11.27-8

+ - Fix segfaults on s390x with rubygem-acitvestorage test suite.

+   Resolves: rhbz#1993193

+ 

  * Sun Aug 22 2021 Richard Shaw <hobbes1069@gmail.com> - 1:6.9.11.27-7

  - Rebuild for OpenEXR/Imath 3.1.

  

Resolves: rhbz#1993193

I'll merge myself ~Monday if there are no concerns.

Pull-Request has been merged by vondruch

2 years ago