Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
ImageMagick.29977
ImageMagick-CVE-2019-13391,13308.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2019-13391,13308.patch of Package ImageMagick.29977
Index: ImageMagick-6.8.8-1/coders/gif.c =================================================================== --- ImageMagick-6.8.8-1.orig/coders/gif.c 2019-07-19 15:05:00.226690899 +0200 +++ ImageMagick-6.8.8-1/coders/gif.c 2019-07-19 15:05:01.010695206 +0200 @@ -679,13 +679,15 @@ static MagickBooleanType EncodeImage(con /* Probe hash table. */ + next_pixel=MagickFalse; + displacement=1; index=(IndexPacket) ((size_t) GetPixelIndex(indexes+x) & 0xff); p++; k=(ssize_t) (((size_t) index << (MaxGIFBits-8))+waiting_code); if (k >= MaxHashTable) k-=MaxHashTable; - next_pixel=MagickFalse; - displacement=1; + if (k < 0) + continue; if (hash_code[k] > 0) { if ((hash_prefix[k] == waiting_code) && Index: ImageMagick-6.8.8-1/magick/fourier.c =================================================================== --- ImageMagick-6.8.8-1.orig/magick/fourier.c 2013-12-01 15:47:50.000000000 +0100 +++ ImageMagick-6.8.8-1/magick/fourier.c 2019-07-19 15:05:37.534895766 +0200 @@ -223,9 +223,9 @@ MagickExport Image *ComplexImages(const progress=0; #if defined(MAGICKCORE_OPENMP_SUPPORT) #pragma omp parallel for schedule(static,4) shared(progress,status) \ - magick_threads(images,complex_images,images->rows,1) + magick_threads(Cr_image,complex_images,Cr_image->rows,1) #endif - for (y=0; y < (ssize_t) images->rows; y++) + for (y=0; y < (ssize_t) Cr_image->rows; y++) { register const PixelPacket *restrict Ai, @@ -257,7 +257,7 @@ MagickExport Image *ComplexImages(const status=MagickFalse; continue; } - for (x=0; x < (ssize_t) images->columns; x++) + for (x=0; x < (ssize_t) Cr_image->columns; x++) { switch (op) { @@ -298,55 +298,70 @@ MagickExport Image *ComplexImages(const gamma; gamma=PerceptibleReciprocal(Br->red*Br->red+Bi->red*Bi->red+snr); - Cr->red=gamma*(Ar->red*Br->red+Ai->red*Bi->red); - Ci->red=gamma*(Ai->red*Br->red-Ar->red*Bi->red); - gamma=PerceptibleReciprocal(Br->green*Br->green+Bi->green*Bi->green+ - snr); - Cr->green=gamma*(Ar->green*Br->green+Ai->green*Bi->green); - Ci->green=gamma*(Ai->green*Br->green-Ar->green*Bi->green); - gamma=PerceptibleReciprocal(Br->blue*Br->blue+Bi->blue*Bi->blue+snr); - Cr->blue=gamma*(Ar->blue*Br->blue+Ai->blue*Bi->blue); - Ci->blue=gamma*(Ai->blue*Br->blue-Ar->blue*Bi->blue); - if (images->matte != MagickFalse) - { - gamma=PerceptibleReciprocal(Br->opacity*Br->opacity+Bi->opacity* - Bi->opacity+snr); - Cr->opacity=gamma*(Ar->opacity*Br->opacity+Ai->opacity* - Bi->opacity); - Ci->opacity=gamma*(Ai->opacity*Br->opacity-Ar->opacity* - Bi->opacity); + Cr->red=gamma*((double) Ar->red*Br->red+(double) Ai->red*Bi->red); + Ci->red=gamma*((double) Ai->red*Br->red-(double) Ar->red*Bi->red); + gamma=PerceptibleReciprocal((double) Br->green*Br->green+(double) + Bi->green*Bi->green+snr); + Cr->green=gamma*((double) Ar->green*Br->green+(double) + Ai->green*Bi->green); + Ci->green=gamma*((double) Ai->green*Br->green-(double) + Ar->green*Bi->green); + gamma=PerceptibleReciprocal((double) Br->blue*Br->blue+(double) + Bi->blue*Bi->blue+snr); + Cr->blue=gamma*((double) Ar->blue*Br->blue+(double) + Ai->blue*Bi->blue); + Ci->blue=gamma*((double) Ai->blue*Br->blue-(double) + Ar->blue*Bi->blue); + if (images->matte != MagickFalse) + { + gamma=PerceptibleReciprocal((double) Br->opacity*Br->opacity+ + (double) Bi->opacity*Bi->opacity+snr); + Cr->opacity=gamma*((double) Ar->opacity*Br->opacity+(double) + Ai->opacity*Bi->opacity); + Ci->opacity=gamma*((double) Ai->opacity*Br->opacity-(double) + Ar->opacity*Bi->opacity); } break; } case MagnitudePhaseComplexOperator: { - Cr->red=sqrt(Ar->red*Ar->red+Ai->red*Ai->red); - Ci->red=atan2(Ai->red,Ar->red)/(2.0*MagickPI)+0.5; - Cr->green=sqrt(Ar->green*Ar->green+Ai->green*Ai->green); - Ci->green=atan2(Ai->green,Ar->green)/(2.0*MagickPI)+0.5; - Cr->blue=sqrt(Ar->blue*Ar->blue+Ai->blue*Ai->blue); + Cr->red=sqrt((double) Ar->red*Ar->red+(double) Ai->red*Ai->red); + Ci->red=atan2((double) Ai->red,(double) Ar->red)/(2.0*MagickPI)+0.5; + Cr->green=sqrt((double) Ar->green*Ar->green+(double) + Ai->green*Ai->green); + Ci->green=atan2((double) Ai->green,(double) Ar->green)/ + (2.0*MagickPI)+0.5; + Cr->blue=sqrt((double) Ar->blue*Ar->blue+(double) Ai->blue*Ai->blue); Ci->blue=atan2(Ai->blue,Ar->blue)/(2.0*MagickPI)+0.5; if (images->matte != MagickFalse) { - Cr->opacity=sqrt(Ar->opacity*Ar->opacity+Ai->opacity*Ai->opacity); - Ci->opacity=atan2(Ai->opacity,Ar->opacity)/(2.0*MagickPI)+0.5; + Cr->opacity=sqrt((double) Ar->opacity*Ar->opacity+(double) + Ai->opacity*Ai->opacity); + Ci->opacity=atan2((double) Ai->opacity,(double) Ar->opacity)/ + (2.0*MagickPI)+0.5; } break; } case MultiplyComplexOperator: { - Cr->red=QuantumScale*(Ar->red*Br->red-Ai->red*Bi->red); - Ci->red=QuantumScale*(Ai->red*Br->red+Ar->red*Bi->red); - Cr->green=QuantumScale*(Ar->green*Br->green-Ai->green*Bi->green); - Ci->green=QuantumScale*(Ai->green*Br->green+Ar->green*Bi->green); - Cr->blue=QuantumScale*(Ar->blue*Br->blue-Ai->blue*Bi->blue); - Ci->blue=QuantumScale*(Ai->blue*Br->blue+Ar->blue*Bi->blue); - if (images->matte != MagickFalse) - { - Cr->opacity=QuantumScale*(Ar->opacity*Br->opacity-Ai->opacity* - Bi->opacity); - Ci->opacity=QuantumScale*(Ai->opacity*Br->opacity+Ar->opacity* - Bi->opacity); + Cr->red=QuantumScale*((double) Ar->red*Br->red-(double) + Ai->red*Bi->red); + Ci->red=QuantumScale*((double) Ai->red*Br->red+(double) + Ar->red*Bi->red); + Cr->green=QuantumScale*((double) Ar->green*Br->green-(double) + Ai->green*Bi->green); + Ci->green=QuantumScale*((double) Ai->green*Br->green+(double) + Ar->green*Bi->green); + Cr->blue=QuantumScale*((double) Ar->blue*Br->blue-(double) + Ai->blue*Bi->blue); + Ci->blue=QuantumScale*((double) Ai->blue*Br->blue+(double) + Ar->blue*Bi->blue); + if (images->matte != MagickFalse) + { + Cr->opacity=QuantumScale*((double) Ar->opacity*Br->opacity- + (double) Ai->opacity*Bi->opacity); + Ci->opacity=QuantumScale*((double) Ai->opacity*Br->opacity+ + (double) Ar->opacity*Bi->opacity); } break; } @@ -373,7 +388,7 @@ MagickExport Image *ComplexImages(const Ci->green=Ai->green-Bi->green; Cr->blue=Ar->blue-Br->blue; Ci->blue=Ai->blue-Bi->blue; - if (images->matte != MagickFalse) + if (Cr_image->matte != MagickFalse) { Cr->opacity=Ar->opacity-Br->opacity; Ci->opacity=Ai->opacity-Bi->opacity;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor