Bug of non termination due to floating-point rounding errors

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
fmaurica
Posts: 2
Joined: 2017-03-02T08:37:12-07:00
Authentication code: 1151

Bug of non termination due to floating-point rounding errors

Post by fmaurica » 2017-03-02T08:43:59-07:00

Bug of non termination due to floating-point rounding errors found in the following version of ImageMagick:

Code: Select all

$ convert -version
Version: ImageMagick 7.0.4-9 Q16 x86_64 2017-02-14 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): png zlib
When launching the following command:

Code: Select all

$ convert flower.png -modulate 100,100,1E25 flower-mod.png
the following function in MagickCore/enhance.c does not terminate:

Code: Select all

static inline void ModulateHSL(const double percent_hue,const double percent_saturation,
                               const double percent_lightness,double *red,double *green,double *blue)
Same problem for the functions ModulateHCL, ModulateHCLp, ModulateHSB, ModulateHSI,
ModulateHSV, ModulateHWB, ModulateLCHab and ModulateLCHuv.
For example non termination of the function ModulateHCL when launching the following command:

Code: Select all

$ convert flower.png -define modulate:colorspace=HCL -modulate 100,100,1E25 flower-mod.png
Other versions of ImageMagick may also be affected.

User avatar
magick
Site Admin
Posts: 10979
Joined: 2003-05-31T11:32:55-07:00

Re: Bug of non termination due to floating-point rounding errors

Post by magick » 2017-03-03T10:16:18-07:00

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

fmaurica
Posts: 2
Joined: 2017-03-02T08:37:12-07:00
Authentication code: 1151

Re: Bug of non termination due to floating-point rounding errors

Post by fmaurica » 2017-03-03T10:47:21-07:00

You are welcome.

Post Reply