Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
ImageMagick.29424
ImageMagick-CVE-2021-20244.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2021-20244.patch of Package ImageMagick.29424
From 329dd528ab79531d884c0ba131e97d43f872ab5d Mon Sep 17 00:00:00 2001 From: ruc_zhangxiaohui <553441439@qq.com> Date: Thu, 4 Feb 2021 04:19:08 +0800 Subject: [PATCH] uses the PerceptibleReciprocal() to prevent the divide-by-zero from occurring (#3194) Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> --- MagickCore/visual-effects.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: ImageMagick-6.8.8-1/magick/fx.c =================================================================== --- ImageMagick-6.8.8-1.orig/magick/fx.c 2021-02-23 11:08:28.920187779 +0100 +++ ImageMagick-6.8.8-1/magick/fx.c 2021-02-23 11:11:31.521340338 +0100 @@ -3298,11 +3298,11 @@ MagickExport Image *ImplodeImage(const I center.y=0.5*image->rows; radius=center.x; if (image->columns > image->rows) - scale.y=(double) image->columns/(double) image->rows; + scale.y=(double) image->columns*PerceptibleReciprocal((double) image->rows); else if (image->columns < image->rows) { - scale.x=(double) image->rows/(double) image->columns; + scale.x=(double) image->rows*PerceptibleReciprocal((double) image->columns); radius=center.y; } /* @@ -3366,11 +3366,11 @@ MagickExport Image *ImplodeImage(const I */ factor=1.0; if (distance > 0.0) - factor=pow(sin((double) (MagickPI*sqrt((double) distance)/ - radius/2)),-amount); + factor=pow(sin((double) (MagickPI*sqrt((double) distance)*PerceptibleReciprocal( + radius)/2)),-amount); (void) InterpolateMagickPixelPacket(image,image_view, - UndefinedInterpolatePixel,(double) (factor*delta.x/scale.x+ - center.x),(double) (factor*delta.y/scale.y+center.y),&pixel, + UndefinedInterpolatePixel,(double) (factor*delta.x*PerceptibleReciprocal(scale.x)+ + center.x),(double) (factor*delta.y*PerceptibleReciprocal(scale.y)+center.y),&pixel, exception); SetPixelPacket(implode_image,&pixel,q,implode_indexes+x); }
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