1 Star 0 Fork 34

mayp/ImageMagick

forked from src-openEuler/ImageMagick 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-CVE-2022-1115.patch 957 Bytes
一键复制 编辑 原始数据 按行查看 历史
cenhuilin 提交于 2022-08-19 21:17 . fix CVE-2022-1115
From 7c8ab995a65a32b8283297226e108ce828a5679a Mon Sep 17 00:00:00 2001
From: cenhuilin <cenhuilin@kylinos.cn>
Date: Fri, 19 Aug 2022 21:02:49 +0800
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 31839f6..32ae00a 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -1987,7 +1987,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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/myp-imago/ImageMagick.git
git@gitee.com:myp-imago/ImageMagick.git
myp-imago
ImageMagick
ImageMagick
master

搜索帮助