blob: 9e95b294e34ad86b32964874fd2219606b5da6cd (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From 93bcbd44f4771227a9e637f69ddabb60e0e33b18 Mon Sep 17 00:00:00 2001
From: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in>
Date: Tue, 11 Nov 2025 14:34:12 +0530
Subject: [PATCH 10/18] ImageMagick: Add support patch 1 to fix CVE-2025-55298
Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/83caf59fce695fea0c5878e9f0d0b65e662cae66]
Comment: Refreshed hunk to match latest kirkstone
Signed-off-by: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in>
---
MagickCore/image.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/MagickCore/image.c b/MagickCore/image.c
index 346285165..f64e83645 100644
--- a/MagickCore/image.c
+++ b/MagickCore/image.c
@@ -1640,21 +1640,23 @@ MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
char
*q;
+ const char
+ *p;
+
int
c;
MagickBooleanType
canonical;
- const char
- *p;
-
ssize_t
offset;
canonical=MagickFalse;
offset=0;
(void) CopyMagickString(filename,format,MagickPathExtent);
+ if (IsStringTrue(GetImageOption(image_info,"filename:literal")) != MagickFalse)
+ return(strlen(filename));
for (p=strchr(format,'%'); p != (char *) NULL; p=strchr(p+1,'%'))
{
q=(char *) p+1;
--
2.34.1
|