From a18045e02a40ab0e77fbc4d31ef4ec5dc74f9cc3 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Thu, 22 Dec 2022 08:00:50 -0500 Subject: [PATCH 1/2] Update libtiff to version 4.5.0 --- gvsbuild/projects/libtiff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/libtiff.py b/gvsbuild/projects/libtiff.py index 278fc0ac4..6a8b2d8bd 100644 --- a/gvsbuild/projects/libtiff.py +++ b/gvsbuild/projects/libtiff.py @@ -26,10 +26,10 @@ def __init__(self): Project.__init__( self, "libtiff-4", - version="4.4.0", + version="4.5.0", repository="https://gitlab.com/libtiff/libtiff", archive_url="http://download.osgeo.org/libtiff/tiff-{version}.tar.gz", - hash="917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed", + hash="c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464", dependencies=["cmake", "ninja", "libjpeg-turbo"], patches=[ "0001-cmake-remove-.d-postfix.patch", From 410809f25e620d52b06a1addb4d5f005fbe5bd56 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Thu, 22 Dec 2022 11:06:44 -0500 Subject: [PATCH 2/2] Update libtiff patches --- ...Ext-fix-unsigned-integer-overflow-on.patch | 38 ------------------- .../0001-cmake-remove-.d-postfix.patch | 10 ++--- gvsbuild/projects/libtiff.py | 1 - 3 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 gvsbuild/patches/libtiff-4/0001-TIFFReadRGBATileExt-fix-unsigned-integer-overflow-on.patch diff --git a/gvsbuild/patches/libtiff-4/0001-TIFFReadRGBATileExt-fix-unsigned-integer-overflow-on.patch b/gvsbuild/patches/libtiff-4/0001-TIFFReadRGBATileExt-fix-unsigned-integer-overflow-on.patch deleted file mode 100644 index c3fd2924d..000000000 --- a/gvsbuild/patches/libtiff-4/0001-TIFFReadRGBATileExt-fix-unsigned-integer-overflow-on.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - 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 ); - } - --- -2.25.1 - diff --git a/gvsbuild/patches/libtiff-4/0001-cmake-remove-.d-postfix.patch b/gvsbuild/patches/libtiff-4/0001-cmake-remove-.d-postfix.patch index 6e8460d86..b5cce74eb 100644 --- a/gvsbuild/patches/libtiff-4/0001-cmake-remove-.d-postfix.patch +++ b/gvsbuild/patches/libtiff-4/0001-cmake-remove-.d-postfix.patch @@ -14,13 +14,13 @@ index 8cfe7ae3..7a8b423a 100644 --- a/cmake/WindowsSupport.cmake +++ b/cmake/WindowsSupport.cmake @@ -25,7 +25,6 @@ - - # Debug postfix + if(MSVC) + # Debug postfix - set(CMAKE_DEBUG_POSTFIX "d") - # disable deprecation warnings - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - # suppress deprecation warning for MSVC POSIX names + + # disable deprecation warnings + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) -- 2.36.1.windows.1 diff --git a/gvsbuild/projects/libtiff.py b/gvsbuild/projects/libtiff.py index 6a8b2d8bd..7c6da341c 100644 --- a/gvsbuild/projects/libtiff.py +++ b/gvsbuild/projects/libtiff.py @@ -33,7 +33,6 @@ def __init__(self): dependencies=["cmake", "ninja", "libjpeg-turbo"], patches=[ "0001-cmake-remove-.d-postfix.patch", - "0001-TIFFReadRGBATileExt-fix-unsigned-integer-overflow-on.patch", ], )