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