Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
ImageMagick.29424
ImageMagick-CVE-2020-27762.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2020-27762.patch of Package ImageMagick.29424
diff --git a/coders/hdr.c b/coders/hdr.c index ab02f8e52..77e3c6336 100644 --- a/coders/hdr.c +++ b/coders/hdr.c @@ -786,9 +786,12 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image) exponent; gamma=frexp(gamma,&exponent)*256.0/gamma; - pixel[0]=(unsigned char) (gamma*QuantumScale*GetPixelRed(p)); - pixel[1]=(unsigned char) (gamma*QuantumScale*GetPixelGreen(p)); - pixel[2]=(unsigned char) (gamma*QuantumScale*GetPixelBlue(p)); + if (GetPixelRed(p) > 0) + pixel[0]=(unsigned char) (gamma*QuantumScale*GetPixelRed(p)); + if (GetPixelGreen(p) > 0) + pixel[1]=(unsigned char) (gamma*QuantumScale*GetPixelGreen(p)); + if (GetPixelBlue(p) > 0) + pixel[2]=(unsigned char) (gamma*QuantumScale*GetPixelBlue(p)); pixel[3]=(unsigned char) (exponent+128); } if ((image->columns >= 8) && (image->columns <= 0x7ffff))
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