Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for standard:i586
SUSE:SLE-12-SP1:GA
ImageMagick.28259
ImageMagick-CVE-2021-20224.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2021-20224.patch of Package ImageMagick.28259
Index: ImageMagick-6.8.8-1/magick/quantum-export.c =================================================================== --- ImageMagick-6.8.8-1.orig/magick/quantum-export.c +++ ImageMagick-6.8.8-1/magick/quantum-export.c @@ -2105,21 +2105,21 @@ static void ExportIndexQuantum(const Ima for (x=((ssize_t) number_pixels-7); x > 0; x-=8) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q=((pixel & 0x01) << 7); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 6); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 5); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 4); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 3); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 2); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 1); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 0); q++; } @@ -2128,7 +2128,7 @@ static void ExportIndexQuantum(const Ima *q='\0'; for (bit=7; bit >= (ssize_t) (8-(number_pixels % 8)); bit--) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << (unsigned char) bit); } q++; @@ -2142,15 +2142,15 @@ static void ExportIndexQuantum(const Ima for (x=0; x < (ssize_t) (number_pixels-1) ; x+=2) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q=((pixel & 0xf) << 4); - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0xf) << 0); q++; } if ((number_pixels % 2) != 0) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q=((pixel & 0xf) << 4); q++; } @@ -2257,25 +2257,25 @@ static void ExportIndexAlphaQuantum(cons for (x=((ssize_t) number_pixels-3); x > 0; x-=4) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q=((pixel & 0x01) << 7); pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ? 1 : 0); *q|=((pixel & 0x01) << 6); p++; - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 5); pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ? 1 : 0); *q|=((pixel & 0x01) << 4); p++; - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 3); pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ? 1 : 0); *q|=((pixel & 0x01) << 2); p++; - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << 1); pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ? 1 : 0); @@ -2288,7 +2288,7 @@ static void ExportIndexAlphaQuantum(cons *q='\0'; for (bit=3; bit >= (ssize_t) (4-(number_pixels % 4)); bit-=2) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q|=((pixel & 0x01) << (unsigned char) (bit+4)); pixel=(unsigned char) (GetPixelOpacity(p) == (Quantum) TransparentOpacity ? 1 : 0); @@ -2306,10 +2306,10 @@ static void ExportIndexAlphaQuantum(cons for (x=0; x < (ssize_t) number_pixels ; x++) { - pixel=(unsigned char) *indexes++; + pixel=(unsigned char) ((ssize_t) *indexes++); *q=((pixel & 0xf) << 4); - pixel=(unsigned char) (16*QuantumScale*((Quantum) (QuantumRange- - GetPixelOpacity(p)))+0.5); + pixel=(unsigned char) ((ssize_t) (16*QuantumScale*((Quantum) + (QuantumRange-GetPixelOpacity(p)))+0.5)); *q|=((pixel & 0xf) << 0); p++; q++; @@ -2340,7 +2340,8 @@ static void ExportIndexAlphaQuantum(cons { for (x=0; x < (ssize_t) number_pixels; x++) { - q=PopShortPixel(quantum_info->endian,(unsigned short) GetPixelIndex(indexes+x),q); + q=PopShortPixel(quantum_info->endian,(unsigned short) + ((ssize_t) GetPixelIndex(indexes+x)),q); pixel=SinglePrecisionToHalf(QuantumScale*GetPixelAlpha(p)); q=PopShortPixel(quantum_info->endian,pixel,q); p++; @@ -2350,7 +2351,8 @@ static void ExportIndexAlphaQuantum(cons } for (x=0; x < (ssize_t) number_pixels; x++) { - q=PopShortPixel(quantum_info->endian,(unsigned short) GetPixelIndex(indexes+x),q); + q=PopShortPixel(quantum_info->endian,(unsigned short) + ((ssize_t) GetPixelIndex(indexes+x)),q); pixel=ScaleQuantumToShort((Quantum) (QuantumRange-GetPixelOpacity(p))); q=PopShortPixel(quantum_info->endian,pixel,q); p++; @@ -2380,7 +2382,8 @@ static void ExportIndexAlphaQuantum(cons } for (x=0; x < (ssize_t) number_pixels; x++) { - q=PopLongPixel(quantum_info->endian,(unsigned int) GetPixelIndex(indexes+x),q); + q=PopLongPixel(quantum_info->endian,(unsigned int) + GetPixelIndex(indexes+x),q); pixel=ScaleQuantumToLong((Quantum) (QuantumRange-GetPixelOpacity(p))); q=PopLongPixel(quantum_info->endian,pixel,q); p++; @@ -2415,10 +2418,9 @@ static void ExportIndexAlphaQuantum(cons range=GetQuantumRange(quantum_info->depth); for (x=0; x < (ssize_t) number_pixels; x++) { - q=PopQuantumPixel(quantum_info, - GetPixelIndex(indexes+x),q); - q=PopQuantumPixel(quantum_info, - ScaleQuantumToAny((Quantum) (GetPixelAlpha(p)),range),q); + q=PopQuantumPixel(quantum_info,GetPixelIndex(indexes+x),q); + q=PopQuantumPixel(quantum_info,ScaleQuantumToAny((Quantum) + (GetPixelAlpha(p)),range),q); p++; q+=quantum_info->pad; } @@ -2623,8 +2625,8 @@ static void ExportRedQuantum(QuantumInfo range=GetQuantumRange(quantum_info->depth); for (x=0; x < (ssize_t) number_pixels; x++) { - q=PopQuantumPixel(quantum_info, - ScaleQuantumToAny(GetPixelRed(p),range),q); + q=PopQuantumPixel(quantum_info,ScaleQuantumToAny(GetPixelRed(p),range), + q); p++; q+=quantum_info->pad; } @@ -2738,7 +2740,8 @@ static void ExportRGBQuantum(QuantumInfo break; } } - q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4),q); + q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4), + q); switch ((x+1) % 3) { default: @@ -2759,7 +2762,8 @@ static void ExportRGBQuantum(QuantumInfo break; } } - q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4),q); + q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4), + q); q+=quantum_info->pad; } for (bit=0; bit < (ssize_t) (3*number_pixels % 2); bit++) @@ -2784,7 +2788,8 @@ static void ExportRGBQuantum(QuantumInfo break; } } - q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4),q); + q=PopShortPixel(quantum_info->endian,(unsigned short) (pixel << 4), + q); q+=quantum_info->pad; } if (bit != 0)
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