34 lines
923 B
Diff
34 lines
923 B
Diff
From 965fa243004e012adc533ae8e38db3055f101a7f Mon Sep 17 00:00:00 2001
|
|
From: Arie Haenel <arie.haenel@jct.ac.il>
|
|
Date: Wed, 19 Jul 2023 14:18:12 +0000
|
|
Subject: [PATCH] Fix for ticket #591
|
|
|
|
Reference:https://gitlab.com/libtiff/libtiff/-/merge_requests/515/diffs
|
|
Conflict:Adaptation Context
|
|
|
|
---
|
|
tools/tiffcp.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
|
|
index 57eef90..7120837 100644
|
|
--- a/tools/tiffcp.c
|
|
+++ b/tools/tiffcp.c
|
|
@@ -1577,6 +1577,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
|
TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)");
|
|
return 0;
|
|
}
|
|
+
|
|
+ if ( (imagew - tilew * spp) > INT_MAX ){
|
|
+ TIFFError(TIFFFileName(in),
|
|
+ "Error, image raster scan line size is too large");
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
iskew = imagew - tilew*spp;
|
|
tilebuf = limitMalloc(tilesize);
|
|
if (tilebuf == 0)
|
|
--
|
|
2.27.0
|
|
|