File: CVE-2021-20243.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 (26 lines) | stat: -rw-r--r-- 1,115 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
25
26
Backport of:

From 53cb91b3e7bf95d0e372cbc745e0055ac6054745 Mon Sep 17 00:00:00 2001
From: Cristy <mikayla-grace@urban-warrior.org>
Date: Wed, 3 Feb 2021 15:30:39 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/pull/3177

---
 coders/dcm.c            | 12 ++++++------
 coders/jp2.c            |  6 ++++--
 magick/resize.c         |  2 +-
 magick/thread-private.h |  6 +++---
 magick/visual-effects.c |  6 ++++--
 5 files changed, 18 insertions(+), 14 deletions(-)

--- imagemagick-6.9.11.60+dfsg.orig/magick/resize.c
+++ imagemagick-6.9.11.60+dfsg/magick/resize.c
@@ -1611,7 +1611,7 @@ MagickExport MagickRealType GetResizeFil
   */
   assert(resize_filter != (ResizeFilter *) NULL);
   assert(resize_filter->signature == MagickCoreSignature);
-  x_blur=fabs((double) x)/resize_filter->blur;  /* X offset with blur scaling */
+  x_blur=fabs((double) x)*PerceptibleReciprocal(resize_filter->blur); /* X offset with blur scaling */
   if ((resize_filter->window_support < MagickEpsilon) ||
       (resize_filter->window == Box))
     scale=1.0;  /* Point or Box Filter -- avoid division by zero */