File ImageMagick-CVE-2021-20309.patch of Package ImageMagick.30356
Index: ImageMagick-7.0.7-34/MagickCore/fx.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickCore/fx.c 2021-04-15 14:21:28.487386928 +0200
+++ ImageMagick-7.0.7-34/MagickCore/fx.c 2021-04-15 14:21:28.499386997 +0200
@@ -5671,8 +5671,8 @@ MagickExport Image *WaveImage(const Imag
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
}
for (i=0; i < (ssize_t) wave_image->columns; i++)
- sine_map[i]=fabs(amplitude)+amplitude*sin((double) ((2.0*MagickPI*i)/
- wave_length));
+ sine_map[i]=fabs(amplitude)+amplitude*sin((double)
+ ((2.0*MagickPI*i)*PerceptibleReciprocal(wave_length)));
/*
Wave image.
*/