1 Star 0 Fork 30

guoxiaoqi / ImageMagick

forked from src-openEuler / ImageMagick 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2020-29599-4.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
wangxiao65 提交于 2021-01-12 15:31 . fix CVE-2020-29599
From a2b3dd8455da2f17849b55e6b6ddcce587e4a323 Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Mon, 16 Nov 2020 17:01:57 +0000
Subject: [PATCH] shell injection vulnerability via the -authenticate option
---
coders/pdf.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/coders/pdf.c b/coders/pdf.c
index 5e4edc760..63eda5d81 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -588,11 +588,14 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (option != (char *) NULL)
{
char
- passphrase[MaxTextExtent];
-
- (void) FormatLocaleString(passphrase,MaxTextExtent,
- "\"-sPDFPassword=%s\" ",option);
- (void) ConcatenateMagickString(options,passphrase,MaxTextExtent);
+ message[MagickPathExtent],
+ *passphrase;
+
+ passphrase=SanitizeString(option);
+ (void) FormatLocaleString(message,MagickPathExtent,
+ "\"-sPDFPassword=%s\" ",passphrase);
+ passphrase=DestroyString(passphrase);
+ (void) ConcatenateMagickString(options,message,MagickPathExtent);
}
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
1
https://gitee.com/angela7/ImageMagick.git
git@gitee.com:angela7/ImageMagick.git
angela7
ImageMagick
ImageMagick
master

搜索帮助