mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-01-12 03:24:08 +00:00
imagemagick: patch CVE-2025-57807
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-57807 Pick the commit mentioned in the details. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From f8e4069153330021aefa6fc7c6c09df2444de021 Mon Sep 17 00:00:00 2001
|
||||
From: Cristy <urban-warrior@imagemagick.org>
|
||||
Date: Sun, 24 Aug 2025 12:32:18 -0400
|
||||
Subject: [PATCH] CVE-2025-57807
|
||||
|
||||
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-23hg-53q6-hqfg
|
||||
|
||||
CVE: CVE-2025-57807
|
||||
Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/077a417a19a5ea8c85559b602754a5b928eef23e]
|
||||
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
---
|
||||
MagickCore/blob.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/MagickCore/blob.c b/MagickCore/blob.c
|
||||
index d00b0ac57..5ee81a68b 100644
|
||||
--- a/MagickCore/blob.c
|
||||
+++ b/MagickCore/blob.c
|
||||
@@ -1630,7 +1630,7 @@ static inline ssize_t WriteBlobStream(Image *image,const size_t length,
|
||||
extent=(MagickSizeType) (blob_info->offset+(MagickOffsetType) length);
|
||||
if (extent >= blob_info->extent)
|
||||
{
|
||||
- extent=blob_info->extent+blob_info->quantum+length;
|
||||
+ extent+=blob_info->quantum+length;
|
||||
blob_info->quantum<<=1;
|
||||
if (SetBlobExtent(image,extent) == MagickFalse)
|
||||
return(0);
|
||||
@@ -5912,12 +5912,15 @@ MagickExport ssize_t WriteBlob(Image *image,const size_t length,
|
||||
}
|
||||
case BlobStream:
|
||||
{
|
||||
- if ((blob_info->offset+(MagickOffsetType) length) >=
|
||||
- (MagickOffsetType) blob_info->extent)
|
||||
+ MagickSizeType
|
||||
+ extent;
|
||||
+
|
||||
+ extent=(MagickSizeType) (blob_info->offset+(MagickOffsetType) length);
|
||||
+ if (extent >= blob_info->extent)
|
||||
{
|
||||
if (blob_info->mapped != MagickFalse)
|
||||
return(0);
|
||||
- blob_info->extent+=length+blob_info->quantum;
|
||||
+ blob_info->extent=extent+blob_info->quantum+length;
|
||||
blob_info->quantum<<=1;
|
||||
blob_info->data=(unsigned char *) ResizeQuantumMemory(
|
||||
blob_info->data,blob_info->extent+1,sizeof(*blob_info->data));
|
||||
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=htt
|
||||
file://0001-CVE-2025-55160.patch \
|
||||
file://0001-CVE-2025-55212.patch \
|
||||
file://0001-CVE-2025-57803.patch \
|
||||
file://0001-CVE-2025-57807.patch \
|
||||
"
|
||||
SRCREV = "a2d96f40e707ba54b57e7d98c3277d3ea6611ace"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user