1 Star 0 Fork 33

Alex/libtiff

forked from src-openEuler/libtiff 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-0002-CVE-2022-22844.patch 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
albatross 提交于 2022-03-08 19:10 +08:00 . fix CVE-2022-22844
From 0cf67888e32e36b45828dd467920684c93f2b22d Mon Sep 17 00:00:00 2001
From: Timothy Lyanguzov <theta682@gmail.com>
Date: Tue, 25 Jan 2022 04:27:28 +0000
Subject: [PATCH] Apply 4 suggestion(s) to 1 file(s)
Conflict:NA
Reference:https://gitlab.com/libtiff/libtiff/-/commit/0cf67888e32e36b45828dd467920684c93f2b22d
---
tools/tiffset.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/tiffset.c b/tools/tiffset.c
index b7badd9..b8b52c0 100644
--- a/tools/tiffset.c
+++ b/tools/tiffset.c
@@ -148,15 +148,15 @@ main(int argc, char* argv[])
if (TIFFFieldDataType(fip) == TIFF_ASCII) {
if(TIFFFieldPassCount( fip )) {
size_t len;
- len = (uint32_t)(strlen(argv[arg_index] + 1));
- if (TIFFSetField(tiff, TIFFFieldTag(fip),
+ len = strlen(argv[arg_index] + 1);
+ if (len > UINT16_MAX || TIFFSetField(tiff, TIFFFieldTag(fip),
(uint16_t)len, argv[arg_index]) != 1)
- fprintf( stderr, "Failed to set %s=%s",
+ fprintf( stderr, "Failed to set %s=%s\n",
TIFFFieldName(fip), argv[arg_index] );
} else {
if (TIFFSetField(tiff, TIFFFieldTag(fip),
argv[arg_index]) != 1)
- fprintf( stderr, "Failed to set %s=%s",
+ fprintf( stderr, "Failed to set %s=%s\n",
TIFFFieldName(fip), argv[arg_index] );
}
} else if (TIFFFieldWriteCount(fip) > 0
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/foreson/libtiff.git
git@gitee.com:foreson/libtiff.git
foreson
libtiff
libtiff
master

搜索帮助