summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch')
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch
new file mode 100644
index 0000000000..83dc695528
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8176-0001.patch
@@ -0,0 +1,61 @@
1From 3994cf3b3bc6b54c32f240ca5a412cffa11633fa Mon Sep 17 00:00:00 2001
2From: Lee Howard <faxguy@howardsilvan.com>
3Date: Mon, 19 May 2025 10:53:30 -0700
4Subject: [PATCH] Don't skip the first line of the input image. Addresses
5 issue #703
6
7CVE: CVE-2025-8176
8Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/3994cf3b3bc6b54c32f240ca5a412cffa11633fa]
9
10Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
11---
12 tools/tiffdither.c | 4 ++--
13 tools/tiffmedian.c | 4 ++--
14 2 files changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/tools/tiffdither.c b/tools/tiffdither.c
17index 062fd60..d352554 100644
18--- a/tools/tiffdither.c
19+++ b/tools/tiffdither.c
20@@ -95,7 +95,7 @@ fsdither(TIFF* in, TIFF* out)
21 nextptr = nextline;
22 for (j = 0; j < imagewidth; ++j)
23 *nextptr++ = *inptr++;
24- for (i = 1; i < imagelength; ++i) {
25+ for (i = 0; i < imagelength; ++i) {
26 tmpptr = thisline;
27 thisline = nextline;
28 nextline = tmpptr;
29@@ -138,7 +138,7 @@ fsdither(TIFF* in, TIFF* out)
30 nextptr[0] += v / 16;
31 }
32 }
33- if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
34+ if (TIFFWriteScanline(out, outline, i, 0) < 0)
35 goto skip_on_error;
36 }
37 goto exit_label;
38diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c
39index 93a1741..93e57cf 100644
40--- a/tools/tiffmedian.c
41+++ b/tools/tiffmedian.c
42@@ -844,7 +844,7 @@ quant_fsdither(TIFF* in, TIFF* out)
43 outline = (unsigned char *) _TIFFmalloc(TIFFScanlineSize(out));
44
45 GetInputLine(in, 0, goto bad); /* get first line */
46- for (i = 1; i <= imagelength; ++i) {
47+ for (i = 0; i <= imagelength; ++i) {
48 SWAP(short *, thisline, nextline);
49 lastline = (i >= imax);
50 if (i <= imax)
51@@ -915,7 +915,7 @@ quant_fsdither(TIFF* in, TIFF* out)
52 nextptr += 3;
53 }
54 }
55- if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
56+ if (TIFFWriteScanline(out, outline, i, 0) < 0)
57 break;
58 }
59 bad:
60--
612.40.0