|
@@ -0,0 +1,35 @@
|
|
|
+From e8de4dc1f923576dce9d625caeebd93f9db697e1 Mon Sep 17 00:00:00 2001
|
|
|
+From: Lee Howard <faxguy@howardsilvan.com>
|
|
|
+Date: Wed, 25 Jun 2025 17:14:18 +0000
|
|
|
+Subject: [PATCH] Fix for thumbnail issue #715
|
|
|
+
|
|
|
+CVE: CVE-2025-8177
|
|
|
+Upstream: https://gitlab.com/libtiff/libtiff/-/commit/e8de4dc1f923576dce9d625caeebd93f9db697e1
|
|
|
+Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
|
|
+---
|
|
|
+ tools/thumbnail.c | 10 +++++++++-
|
|
|
+ 1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
+
|
|
|
+diff --git a/tools/thumbnail.c b/tools/thumbnail.c
|
|
|
+index 9cade913..7e21f521 100644
|
|
|
+--- a/tools/thumbnail.c
|
|
|
++++ b/tools/thumbnail.c
|
|
|
+@@ -620,7 +620,15 @@ static void setrow(uint8_t *row, uint32_t nrows, const uint8_t *rows[])
|
|
|
+ }
|
|
|
+ acc += bits[*src & mask1];
|
|
|
+ }
|
|
|
+- *row++ = cmap[(255 * acc) / area];
|
|
|
++ if (255 * acc / area < 256)
|
|
|
++ {
|
|
|
++ *row++ = cmap[(255 * acc) / area];
|
|
|
++ }
|
|
|
++ else
|
|
|
++ {
|
|
|
++ fprintf(stderr, "acc=%d, area=%d\n", acc, area);
|
|
|
++ *row++ = cmap[0];
|
|
|
++ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+--
|
|
|
+GitLab
|