File ImageMagick-CVE-2021-20246.patch of Package ImageMagick.30356
From 8d25d94a363b104acd6ff23df7470aeedb806c51 Mon Sep 17 00:00:00 2001
From: Cristy <mikayla-grace@urban-warrior.org>
Date: Wed, 3 Feb 2021 15:50:41 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/3195
---
MagickCore/resample.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: ImageMagick-7.0.7-34/MagickCore/resample.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickCore/resample.c 2018-05-20 17:55:43.000000000 +0200
+++ ImageMagick-7.0.7-34/MagickCore/resample.c 2021-02-23 10:06:49.220118183 +0100
@@ -1200,10 +1200,10 @@ MagickExport void ScaleResampleFilter(Re
{ register double scale;
#if FILTER_LUT
/* scale so that F = WLUT_WIDTH; -- hardcoded */
- scale = (double)WLUT_WIDTH/F;
+ scale=(double) WLUT_WIDTH*PerceptibleReciprocal(F);
#else
/* scale so that F = resample_filter->F (support^2) */
- scale = resample_filter->F/F;
+ scale=resample_filter->F*PerceptibleReciprocal(F);
#endif
resample_filter->A = A*scale;
resample_filter->B = B*scale;