26 lines
956 B
Diff
26 lines
956 B
Diff
From e88576bc495951a1c08a6e9cdbc2121b4c9d8ac8 Mon Sep 17 00:00:00 2001
|
|
From: cenhuilin <cenhuilin@kylinos.cn>
|
|
Date: Mon, 5 Sep 2022 06:39:50 +0000
|
|
Subject: [PATCH] heap-buffer-overflow in magick at quantum-private.h PushShortPixel
|
|
|
|
---
|
|
coders/tiff.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/coders/tiff.c b/coders/tiff.c
|
|
index 8fd1451..b4c94bb 100644
|
|
--- a/coders/tiff.c
|
|
+++ b/coders/tiff.c
|
|
@@ -1894,7 +1894,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
|
|
number_pixels=(MagickSizeType) columns*rows;
|
|
if (HeapOverflowSanityCheck(rows,sizeof(*tile_pixels)) != MagickFalse)
|
|
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
|
|
- extent=MagickMax(rows*TIFFTileRowSize(tiff),TIFFTileSize(tiff));
|
|
+ extent=4*MagickMax(rows*TIFFTileRowSize(tiff),TIFFTileSize(tiff));
|
|
#if defined(TIFF_VERSION_BIG)
|
|
extent+=image->columns*sizeof(uint64);
|
|
#else
|
|
--
|
|
2.33.0
|
|
|