Bug of non termination due to floating-point rounding errors
Posted: 2017-03-02T08:43:59-07:00
Bug of non termination due to floating-point rounding errors found in the following version of ImageMagick:
When launching the following command:
the following function in MagickCore/enhance.c does not terminate:
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:
Other versions of ImageMagick may also be affected.
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
Code: Select all
$ convert flower.png -modulate 100,100,1E25 flower-mod.png
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)
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