1 Star 0 Fork 34

zhanghua/ImageMagick

forked from src-openEuler/ImageMagick 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2020-25665.patch 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
zhanghua 提交于 2021-03-08 14:42 +08:00 . Fix CVE-2020-27750 CVE-2020-25665 CVE-2020-25674
From ca80e93cc887fb8971ceba2eead2c74e2b927df4 Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 4 Oct 2019 18:19:20 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1714
---
coders/palm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/coders/palm.c b/coders/palm.c
index 125bab8ff..4cd5522a4 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -779,7 +779,7 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
{
(void) TransformImageColorspace(image,sRGBColorspace);
count=GetNumberColors(image,NULL,exception);
- for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
+ for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
if (bits_per_pixel > 16)
bits_per_pixel=16;
else
@@ -879,7 +879,7 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
last_row=(unsigned char *) NULL;
if (image_info->compression == FaxCompression)
{
- last_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row,
+ last_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row+256,
sizeof(*last_row));
if (last_row == (unsigned char *) NULL)
{
@@ -887,7 +887,7 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
}
- one_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row,
+ one_row=(unsigned char *) AcquireQuantumMemory(bytes_per_row+256,
sizeof(*one_row));
if (one_row == (unsigned char *) NULL)
{
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhanghua1831/ImageMagick.git
git@gitee.com:zhanghua1831/ImageMagick.git
zhanghua1831
ImageMagick
ImageMagick
master

搜索帮助