ImageMagick/CVE-2025-43965.patch
starlet-dx 7dec2d7bfc Fix CVE-2025-43965 and CVE-2025-46393
(cherry picked from commit 57f3c0315f4f11bbc2019fc71ccff2075f941386)
2025-04-29 15:30:12 +08:00

23 lines
788 B
Diff

From bac413a26073923d3ffb258adaab07fb3fe8fdc9 Mon Sep 17 00:00:00 2001
From: Dirk Lemstra <dirk@lemstra.org>
Date: Sat, 8 Feb 2025 23:31:39 +0100
Subject: [PATCH] Update the image depth after this has been changed by
SetQuantumFormat.
---
coders/miff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/coders/miff.c b/coders/miff.c
index 66f8d3850bf..77e92500679 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -1335,6 +1335,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
if (quantum_format != UndefinedQuantumFormat)
{
status=SetQuantumFormat(image,quantum_info,quantum_format);
+ image->depth=quantum_info->depth;
if (status == MagickFalse)
ThrowMIFFException(ResourceLimitError,"MemoryAllocationFailed");
}