1 Star 0 Fork 34

yaozc701/ImageMagick

forked from src-openEuler/ImageMagick 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2020-25664.patch 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
zhanghua 提交于 2021-02-10 15:33 +08:00 . fix CVE-2020-25664 CVE-2020-27754
From 27d3ddedb73f63fa984ff5b4d66e07eef654070f Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 4 Oct 2019 19:08:29 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1716
---
coders/png.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/coders/png.c b/coders/png.c
index 410741059..ee6fba297 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -11177,11 +11177,11 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Allocating %.20g bytes of memory for pixels",(double) rowbytes);
}
- pixel_info=AcquireVirtualMemory(rowbytes,sizeof(*ping_pixels));
+ pixel_info=AcquireVirtualMemory(rowbytes+256,sizeof(*ping_pixels));
if (pixel_info == (MemoryInfo *) NULL)
png_error(ping,"Allocation of memory for pixels failed");
ping_pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
- (void) memset(ping_pixels,0,rowbytes*sizeof(*ping_pixels));
+ (void) memset(ping_pixels,0,(rowbytes+256)*sizeof(*ping_pixels));
/*
Initialize image scanlines.
*/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yaozc701/ImageMagick.git
git@gitee.com:yaozc701/ImageMagick.git
yaozc701
ImageMagick
ImageMagick
master

搜索帮助