File: 0079-recursion-detection-framework.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-- 969 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: Cristy <urban-warrior@imagemagick.org>
Date: Mon, 6 Mar 2023 15:06:05 -0500
Subject: recursion detection framework

Avoid a memory leak in previous patches

origin: https://github.com/ImageMagick/ImageMagick6/commit/060660bf45e0771cf0431e5c2749aa51fabf23f8.patch
---
 magick/draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/magick/draw.c b/magick/draw.c
index ce22a42..051f2fe 100644
--- a/magick/draw.c
+++ b/magick/draw.c
@@ -1017,6 +1017,8 @@ MagickExport DrawInfo *DestroyDrawInfo(DrawInfo *draw_info)
     draw_info->clipping_mask=DestroyImage(draw_info->clipping_mask);
   if (draw_info->composite_mask != (Image *) NULL)
     draw_info->composite_mask=DestroyImage(draw_info->composite_mask);
+  if (draw_info->image_info != (ImageInfo *) NULL)
+    draw_info->image_info=DestroyImageInfo(draw_info->image_info);
   draw_info->signature=(~MagickCoreSignature);
   draw_info=(DrawInfo *) RelinquishMagickMemory(draw_info);
   return(draw_info);