aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-11-23 21:26:19 +0000
committerCy Schubert <cy@FreeBSD.org>2022-11-23 21:32:43 +0000
commit76ee9a3057a59e9a119e8ee4186072db806d90ea (patch)
tree007c2236aabd9e685237e229d575be6f9f9f4635 /graphics
parent8376433ae3a745955db1ae54b81bd081955b94fe (diff)
Diffstat (limited to 'graphics')
-rw-r--r--graphics/tiff/Makefile1
-rw-r--r--graphics/tiff/files/patch-libtiff_tif_getimage.c22
2 files changed, 23 insertions, 0 deletions
diff --git a/graphics/tiff/Makefile b/graphics/tiff/Makefile
index 63744a0a6554..1b038a6b6930 100644
--- a/graphics/tiff/Makefile
+++ b/graphics/tiff/Makefile
@@ -1,5 +1,6 @@
PORTNAME= tiff
DISTVERSION= 4.4.0
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= https://download.osgeo.org/libtiff/
diff --git a/graphics/tiff/files/patch-libtiff_tif_getimage.c b/graphics/tiff/files/patch-libtiff_tif_getimage.c
new file mode 100644
index 000000000000..d3235c58968f
--- /dev/null
+++ b/graphics/tiff/files/patch-libtiff_tif_getimage.c
@@ -0,0 +1,22 @@
+--- libtiff/tif_getimage.c.orig 2022-02-19 07:33:54.000000000 -0800
++++ libtiff/tif_getimage.c 2022-11-23 11:36:14.192628000 -0800
+@@ -3058,15 +3058,15 @@
+ return( ok );
+
+ for( i_row = 0; i_row < read_ysize; i_row++ ) {
+- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize,
+- raster + (read_ysize - i_row - 1) * read_xsize,
++ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize,
++ raster + (size_t)(read_ysize - i_row - 1) * read_xsize,
+ read_xsize * sizeof(uint32_t) );
+- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize,
++ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize,
+ 0, sizeof(uint32_t) * (tile_xsize - read_xsize) );
+ }
+
+ for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) {
+- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize,
++ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize,
+ 0, sizeof(uint32_t) * tile_xsize );
+ }
+