From ecc4ddbf1f0fed7957d1e20361e37f01907898e0 Mon Sep 17 00:00:00 2001
From: Lee Howard <faxguy@howardsilvan.com>
Date: Sat, 24 May 2025 21:38:09 -0700
Subject: [PATCH] conflict resolution

CVE: CVE-2025-8176
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/ecc4ddbf1f0fed7957d1e20361e37f01907898e0]

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
---
 tools/tiffmedian.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c
index a0b4b5d..ca1c51f 100644
--- a/tools/tiffmedian.c
+++ b/tools/tiffmedian.c
@@ -847,7 +847,7 @@ quant_fsdither(TIFF* in, TIFF* out)
	outline = (unsigned char *) _TIFFmalloc(TIFFScanlineSize(out));

	GetInputLine(in, 0, goto bad);		/* get first line */
-	for (i = 0; i <= imagelength; ++i) {
+	for (i = 0; i < imagelength; ++i) {
		SWAP(short *, thisline, nextline);
		lastline = (i >= imax);
		if (i <= imax)
--
2.40.0
