1 Star 0 Fork 33

Alex/libtiff

forked from src-openEuler/libtiff 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-0001-CVE-2022-3570-CVE-2022-3598.patch 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
From fc3e3a202d65e4b0f42a63c8001324b2a7fae88b Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Mon, 27 Sep 2021 18:42:22 +0200
Subject: [PATCH] tiffcrop.c: remove useless 'set but not read' variables
---
tools/tiffcrop.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index b85c2ce7..0da31577 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -1177,7 +1177,6 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf,
tstrip_t strip = 0;
tsize_t stripsize = TIFFStripSize(out);
tsize_t rowstripsize, scanlinesize = TIFFScanlineSize(out);
- tsize_t total_bytes = 0;
tdata_t obuf;
(void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
@@ -1215,7 +1214,6 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf,
stripsize = TIFFVStripSize(out, nrows);
src = buf + (row * rowsize);
- total_bytes += stripsize;
memset (obuf, '\0', rowstripsize);
if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump))
{
@@ -2710,7 +2708,7 @@ static void dump_info(FILE *dumpfile, int format, char *prefix, char *msg, ...)
static int dump_buffer (FILE* dumpfile, int format, uint32_t rows, uint32_t width,
uint32_t row, unsigned char *buff)
{
- int j, k;
+ int k;
uint32_t i;
unsigned char * dump_ptr;
@@ -2728,7 +2726,7 @@ static int dump_buffer (FILE* dumpfile, int format, uint32_t rows, uint32_t widt
"Row %4"PRIu32", %"PRIu32" bytes at offset %"PRIu32,
row + i + 1u, width, row * width);
- for (j = 0, k = width; k >= 10; j += 10, k -= 10, dump_ptr += 10)
+ for (k = width; k >= 10; k -= 10, dump_ptr += 10)
dump_data (dumpfile, format, "", dump_ptr, 10);
if (k > 0)
dump_data (dumpfile, format, "", dump_ptr, k);
--
GitLab
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/foreson/libtiff.git
git@gitee.com:foreson/libtiff.git
foreson
libtiff
libtiff
master

搜索帮助