File: CVE-2021-20246.patch

package info (click to toggle)
imagemagick 8%3A6.9.11.60%2Bdfsg-1.6%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,816 kB
  • sloc: ansic: 349,503; cpp: 21,804; xml: 11,029; perl: 6,417; sh: 5,877; makefile: 3,042; tcl: 459
file content (24 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From f3190d4a6e6e8556575c84b5d976f77d111caa74 Mon Sep 17 00:00:00 2001
From: Cristy <mikayla-grace@urban-warrior.org>
Date: Wed, 3 Feb 2021 15:50:29 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/3195

---
 magick/resample.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- imagemagick-6.9.11.60+dfsg.orig/magick/resample.c
+++ imagemagick-6.9.11.60+dfsg/magick/resample.c
@@ -1212,10 +1212,10 @@ MagickExport void ScaleResampleFilter(Re
   { 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;