From c83c038d357d61ea7e6b4ad6a6c4384ab6c457ee Mon Sep 17 00:00:00 2001
From: Even Rouault <[EMAIL REDACTED]>
Date: Fri, 9 Dec 2022 15:54:08 +0100
Subject: [PATCH 1/2] Prepare v4.5.0 release
---
ChangeLog | 1373 +++++++++++++++++++++++++++++++++++++++
HOWTO-RELEASE | 12 +-
RELEASE-DATE | 2 +-
VERSION | 2 +-
doc/Makefile.am | 2 +
doc/index.rst | 2 +-
doc/releases/index.rst | 1 +
doc/releases/v4.5.0.rst | 128 ++++
libtiff/tiffvers.h | 4 +-
9 files changed, 1515 insertions(+), 11 deletions(-)
create mode 100644 doc/releases/v4.5.0.rst
diff --git a/ChangeLog b/ChangeLog
index bab7c008..52f78081 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1376 @@
+2022-12-09 Even Rouault <even.rouault@spatialys.com>
+
+ libtiff v4.5.0 released
+
+2022-12-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'reformat' into 'master'
+ Whole code-base reformatting
+
+ See merge request libtiff/libtiff!431
+
+2022-12-08 Even Rouault <even.rouault@spatialys.com>
+
+ Add .git-blame-ignore-revs.
+
+ tiffcrop: remove version_id and rev_date.
+
+2022-12-08 pre-commit run by Even Rouault <even.rouault-bot@spatialys.com>
+
+ Reformatting in all other directories using 'pre-commit run'
+
+ Reformatting in test/ using 'pre-commit run'
+
+ Reformatting in tools/ using 'pre-commit run'
+
+ Reformatting in libtiff/ using 'pre-commit run'
+
+2022-12-08 Even Rouault <even.rouault@spatialys.com>
+
+ Add .clang-format, .pre-commit-config.yaml and CONTRIBUTING.md.
+
+ Remove vim/emacs formatting footers.
+
+2022-11-29 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_489' into 'master'
+ TIFFWriteRawStrip(): restore capabilities to append data in the current strip (fixes #489)
+
+ Closes #489
+
+ See merge request libtiff/libtiff!430
+
+2022-11-29 Even Rouault <even.rouault@spatialys.com>
+
+ Add test case for scenario of issue #489.
+
+ TIFFWriteRawStrip(): restore capabilities to append data in the current strip (fixes #489)
+ This fixes a regression of libtiff 4.4.0
+
+2022-11-29 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'manpage_re-entrant_error_handler' into 'master'
+ manpage update for re-entrant error handler TIFFErrorExtR(), TIFFOpenExt() and...
+
+ See merge request libtiff/libtiff!427
+
+2022-11-29 Su Laus <sulau@freenet.de>
+
+ manpage update for re-entrant error handler TIFFErrorExtR(), TIFFOpenExt() and...
+
+2022-11-27 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_fix_#169' into 'master'
+ tiffcrop: Add check if (bps != 1) in writeSingleSection() for...
+
+ Closes #169
+
+ See merge request libtiff/libtiff!429
+
+2022-11-27 Su Laus <sulau@freenet.de>
+
+ tiffcrop: Add check if (bps != 1) in writeSingleSection() for...
+
+2022-11-26 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'TIFFErrorExtR_fix_missing_calls' into 'master'
+ TIFFErrorExt() was not replaced with TIFFErrorExtR() everywhere in libtiff....
+
+ See merge request libtiff/libtiff!428
+
+2022-11-26 Su Laus <sulau@freenet.de>
+
+ TIFFErrorExt() was not replaced with TIFFErrorExtR() everywhere in libtiff....
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tif_jpeg_build_fix' into 'master'
+ tif_jpeg.c: fix compilation with MSVC (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b)
+
+ See merge request libtiff/libtiff!426
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ tif_jpeg.c: fix compilation with MSVC (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b)
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_0fd1a81d3547acb8f5be50bbbc3e44bde01c014b' into 'master'
+ JPEGEncode(): fix wrong pointer data type with libjpeg-turbo 2.2dev in 12-bit mode
+
+ See merge request libtiff/libtiff!425
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ JPEGEncode(): fix wrong pointer data type with libjpeg-turbo 2.2dev in 12-bit mode
+ (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b)
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'libjpegturbo_dual' into 'master'
+ Add support for libjpeg-turbo 2.2-dev 8/12 bit dual mode
+
+ See merge request libtiff/libtiff!422
+
+2022-11-25 Even Rouault <even.rouault@spatialys.com>
+
+ Add support for libjpeg-turbo 2.2-dev 8/12 bit dual mode.
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'windows-fix' into 'master'
+ libtiff: Fix TIFFOpen* for the Windows platform in tif_unix.c
+
+ See merge request libtiff/libtiff!424
+
+2022-11-23 Francois Bleibel <fbleibel@gmail.com>
+
+ libtiff: Fix TIFFOpen* for the Windows platform in tif_unix.c.
+ I'm not sure where this change was made, but it must have been in a recent update. TIFFOpenWEx is now TIFFOpenWExt, and _TIFFgetMode takes additional arguments.
+
+ Verified: Tested libtiff on a local Windows build.
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_signed_vs_unsigned' into 'master'
+ tiffcrop.c: fix warning about signed vs unsigned comparison
+
+ See merge request libtiff/libtiff!423
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ tiffcrop.c: fix warning about signed vs unsigned comparison.
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'TIFFClientOpenExt_warning_fix' into 'master'
+ TIFFClientOpenExt(): fix warning on 32-bit platforms (master only)
+
+ See merge request libtiff/libtiff!421
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ TIFFClientOpenExt(): fix warning on 32-bit platforms (master only)
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcp_TIFFOpenOptionsFree_memleak_fix' into 'master'
+ tiffcp: fix leak of TIFFOpenOptionsAlloc() introduced in latest commit (master only)
+
+ See merge request libtiff/libtiff!420
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ tiffcp: fix leak of TIFFOpenOptionsAlloc() introduced in latest commit (master only)
+ Fixes Coverity CID 1517032
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'TIFFOpenOptionsSetMaxSingleMemAlloc' into 'master'
+ Add TIFFOpenOptionsSetMaxSingleMemAlloc() to define a limit in bytes for a single memory allocation done by libtiff
+
+ See merge request libtiff/libtiff!419
+
+2022-11-23 Even Rouault <even.rouault@spatialys.com>
+
+ Emit explicit error message when tif_max_single_mem_alloc is exceeded.
+
+ test_open_options: test TIFFOpenOptionsSetMaxSingleMemAlloc()
+
+ Rename test_error_handlers to test_open_options.
+
+ tiffinfo, tiffcp, tiffcrop, tiffsplit, tiff2rgba, tiff2ps: use TIFFOpenOptionsSetMaxSingleMemAlloc()
+
+ Convert uses of _TIFFmalloc/realloc/calloc/free to the Ext functions.
+
+2022-11-22 Even Rouault <even.rouault@spatialys.com>
+
+ Add TIFFOpenOptionsSetMaxSingleMemAlloc()
+ to define a limit in bytes for a single memory allocation done by libtiff.
+
+ Also add internal functions used in replacement of the non Ext ones:
+ void* _TIFFmallocExt(TIFF* tif, tmsize_t s);
+ void* _TIFFcallocExt(TIFF* tif, tmsize_t nmemb, tmsize_t siz);
+ void* _TIFFreallocExt(TIFF* tif, void* p, tmsize_t s);
+ void _TIFFfreeExt(TIFF* tif, void* p);
+
+2022-11-22 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'TIFFOpenEx' into 'master'
+ Add TIFFOpenExt(), TIFFOpenWExt() and TIFFFdOpenExt() with re-entrant error handlers
+
+ See merge request libtiff/libtiff!413
+
+2022-11-21 Even Rouault <even.rouault@spatialys.com>
+
+ Remove TIFFSetErrorHandlerExtR() and TIFFSetWarningHandlerExtR() that were temporarily added in master
+
+ Add a _TIFFErrorEarly() function to be able to use the re-entrant error handler, even before TIFF* is valid
+
+ Rework TIFFOpenExt() and similar to use an opaque TIFFOpenOptions* opts argument, with alloc, free and setters
+
+ Document TIFFOpenExt, TIFFOpenWExt, TIFFFdOpenExt, TIFFClientOpenExt, TIFFSetErrorHandlerExtR, TIFFSetWarningHandlerExtR
+
+2022-11-21 Even Rouault <even.rouault@spatialys.com>
+
+ Add TIFFOpenExt(), TIFFOpenWExt() and TIFFFdOpenExt() with re-entrant error handlers
+ Rename TIFFClientOpenEx() to TIFFClientOpenExt()
+
+ Rework signature of the re-entrant error handlers and of
+ TIFFSetWarningHandlerExt() and TIFFSetErrorHandlerExt()
+
+ Use structures that can be extended as extra argument.
+
+ Leverages and ammends https://gitlab.com/libtiff/libtiff/-/merge_requests/409
+
+2022-11-21 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'manpage_fix485_file-descriptor_clientdata' into 'master'
+ manpage: Correct description of file handle/descriptors tif_fd and tif_clientdata. Closes #485.
+
+ Closes #485
+
+ See merge request libtiff/libtiff!418
+
+2022-11-21 Su Laus <sulau@freenet.de>
+
+ manpage: Correct description of file handle/descriptors tif_fd and tif_clientdata. Closes #485.
+
+2022-11-20 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'manpage_fix440_fix28_TIFFOpen_SubIFD_update' into 'master'
+ manpage: fix28, fix440, update TIFFOpen and SubIFD
+
+ Closes #440 et #28
+
+ See merge request libtiff/libtiff!417
+
+2022-11-20 Su Laus <sulau@freenet.de>
+
+ manpage: fix28, fix440, update TIFFOpen and SubIFD.
+
+2022-11-17 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'cmake_tiff_install_warning' into 'master'
+ CMakeLists.txt: fix warning with -Wdev
+
+ See merge request libtiff/libtiff!416
+
+2022-11-13 Even Rouault <even.rouault@spatialys.com>
+
+ CMakeLists.txt: fix warning with -Wdev.
+ ```
+ CMake Warning (dev) at CMakeLists.txt:62 (option):
+ Policy CMP0077 is not set: option() honors normal variables. Run "cmake
+ --help-policy CMP0077" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+ For compatibility with older versions of CMake, option is clearing the
+ normal variable 'tiff-install'.
+ This warning is for project developers. Use -Wno-dev to suppress it.
+ ```
+
+2022-11-12 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_479' into 'master'
+ _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on...
+
+ See merge request libtiff/libtiff!412
+
+2022-11-12 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'typo_fix' into 'master'
+ tif_dirread.c: fix typo in comment
+
+ See merge request libtiff/libtiff!414
+
+2022-11-12 Even Rouault <even.rouault@spatialys.com>
+
+ tif_dirread.c: fix typo in comment.
+
+2022-11-11 Even Rouault <even.rouault@spatialys.com>
+
+ _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on broken files (fixes #479)
+
+2022-11-10 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'bugfix/tiff2pdf-stdout' into 'master'
+ tiff2pdf Don't try to seek into stdout.
+
+ See merge request libtiff/libtiff!367
+
+2022-11-10 Claus-Justus Heine <himself@claus-justus-heine.de>
+
+ tiff2pdf: Don't try to seek into stdout.
+ Fixes #441
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_coverity_1516759' into 'master'
+ TIFFErrorExtR(): fix Dereference after null check (CID 1516759)
+
+ See merge request libtiff/libtiff!411
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_ossfuzz_53137' into 'master'
+ TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB
+
+ See merge request libtiff/libtiff!410
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ TIFFErrorExtR(): fix Dereference after null check (CID 1516759)
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'no_sprintf' into 'master'
+ Replace sprintf calls with snprintf
+
+ See merge request libtiff/libtiff!408
+
+2022-11-08 Mark Mentovai <mark@chromium.org>
+
+ Replace sprintf calls with snprintf.
+ This makes it possible to build libtiff without warnings using the macOS
+ 13 SDK. Calls to sprintf are replaced with snprintf, passing appropriate
+ buffer sizes.
+
+ It doesn’t appear that any of the changed uses of sprintf were actually
+ unsafe, so no behavior change is expected aside from SDK compatibility.
+
+ The macOS 13 SDK deprecates sprintf as it’s difficult to use safely. The
+ deprecation warning message is visible when building C++, but it is not
+ normally visible when building plain C code due to a quirk in how
+ sprintf is declared in the SDK. However, the deprecation message is
+ visible when building plain C under Address Sanitizer
+ (-fsanitize=address). This discrepancy was discovered at
+ https://crbug.com/1381706 and reported to Apple with a copy at
+ https://openradar.appspot.com/FB11761475.
+
+ The macOS 13 SDK is packaged in Xcode 14.1, released on 2022-11-01. This
+ also affects the iOS 16 SDK and other 2022-era Apple OS SDKs packaged in
+ Xcode 14.0, released on 2022-09-12.
+
+ libtiff is visible to the Chromium build via PDFium, and this change is
+ needed to allow Chromium to move forward to the macOS 13 SDK.
+
+ This change is limited to the libtiff directory. Other uses of sprintf
+ were found in contrib, test, and tools.
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'reentrant' into 'master'
+ Add reentrant error functions
+
+ See merge request libtiff/libtiff!409
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB
+ Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137
+
+2022-11-08 Laramie Leavitt <lar@google.com>
+
+ Add reentrant error functions.
+ Prior to this change, libtiff relied on global error handlers,
+ which is problematic when libtiff used by multiple independent
+ libraries from within the same process, as they may unwittingly
+ clobber the error handling, introduce race conditions when setting
+ handlers, or otherwise have unintended side effects.
+
+ This change adds error handlers to the TIFF struct, which are
+ used preferentially when available. The error handlers are invoked
+ when the re-entrant error functions are called:
+
+ void TIFFErrorExtR(TIFF*, const char* module, const char* fmt, ...)
+ void TIFFWarningExtR(TIFF*, const char* module, const char* fmt, ...)
+
+ The handlers have a similar signature to the existing extended
+ handlers, additionally returning an int:
+
+ int TIFFErrorHandlerExtR(thandle_t, const char*, const char*, va_list)
+
+ thandle_t is the userdata passed to TIFFOpen
+ When the handler returns 1, the global handlers are not called.
+
+ Custom error/warning handlers may be installed on a per-file
+ basis by calling the Set functions:
+
+ TIFF* tif = TIFFOpen(...);
+ TIFFSetErrorHandlerExtR(tif, MyErrorHandler);
+ TIFFSetWarningHandlerExtR(tif, MyWarningHandler);
+
+ Additionally, the callsites to TIFFErrorExt and TIFFWarningExt
+ have been updated to call the reentrant versions.
+
+2022-11-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_fix_CoverityScan_tmsize_issue' into 'master'
+ tiffcrop: should fix some Coverity Scan issues OVERFLOW_BEFORE_WIDEN
+
+ See merge request libtiff/libtiff!403
+
+2022-11-08 Su Laus <sulau@freenet.de>
+
+ tiffcrop: should fix some Coverity Scan issues OVERFLOW_BEFORE_WIDEN.
+
+2022-11-02 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'typo_fix' into 'master'
+ tif_dirread.c: fix typo in comment
+
+ See merge request libtiff/libtiff!407
+
+2022-11-02 Even Rouault <even.rouault@spatialys.com>
+
+ tif_dirread.c: fix typo in comment.
+
+2022-10-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_formatting_fix' into 'master'
+ tiffcrop: add casts in TIFFError() to fix compiler warnings
+
+ See merge request libtiff/libtiff!406
+
+2022-10-23 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_482' into 'master'
+ CMake: correctly set default value of 'lzma' option when liblzma is detected (fixes #482)
+
+ Closes #482
+
+ See merge request libtiff/libtiff!404
+
+2022-10-23 Even Rouault <even.rouault@spatialys.com>
+
+ tiffcrop: add casts in TIFFError() to fix compiler warnings.
+
+ CMake: correctly set default value of 'lzma' option when liblzma is detected (fixes #482)
+
+2022-10-20 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_480' into 'master'
+ Fix incorrect printf() formatters introduced in recent commits (fixes #480)
+
+ Closes #480
+
+ See merge request libtiff/libtiff!401
+
+2022-10-19 Even Rouault <even.rouault@spatialys.com>
+
+ Fix incorrect printf() formatters introduced in recent commits (fixes #480)
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'CLIPPATH_tags_corrected' into 'master'
+ CLIPPATH tags defined twice but differently and also wrongly (#439) - corrected
+
+ Closes #439
+
+ See merge request libtiff/libtiff!366
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'FIELD_IGNORE_warning-messages' into 'master'
+ Warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (#438)
+
+ Closes #438
+
+ See merge request libtiff/libtiff!365
+
+2022-10-13 Su Laus <sulau@freenet.de>
+
+ Warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (#438)
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tag-def_COMPRESSION_corrected' into 'master'
+ tif_dirinfo.c TIFFTAG_COMPRESSION and _BITSPERSAMPLE definition corrected
+
+ See merge request libtiff/libtiff!364
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_getopt_included_twice' into 'master'
+ Fix including module getopt.c twice with CMake and HAVE_GETOPT=false
+
+ See merge request libtiff/libtiff!381
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_CoverityScan_fix_PRINTF_ARGS' into 'master'
+ tiffcrop: fix Coverity Scan issues about PRINTF_ARGS.
+
+ See merge request libtiff/libtiff!400
+
+2022-10-13 Su_Laus <sulau@freenet.de>
+
+ tiffcrop fix Coverity Scan issues about PRINTF_ARGS.
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_fix_#450_too-many-mode-options' into 'master'
+ tiffcrop: fix #450 too many 'mode' options on command line.
+
+ Closes #470 et #450
+
+ See merge request libtiff/libtiff!384
+
+2022-10-13 Su Laus <sulau@freenet.de>
+
+ tiffcrop: fix #450 too many 'mode' options on command line.
+
+2022-10-13 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_fix_#435' into 'master'
+ tiffcrop subroutines require a larger buffer (fixes #271, #381, #386, #388, #389, #435)
+
+ Closes #465, #464, #435, #389, #388, #386, #381 et #271
+
+ See merge request libtiff/libtiff!382
+
+2022-10-13 Su Laus <sulau@freenet.de>
+
+ tiffcrop subroutines require a larger buffer (fixes #271, #381, #386, #388, #389, #435)
+
+2022-10-12 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'InkNames_NumberOfInks_handling_revised' into 'master'
+ Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value (fixes #149, #150, #152, #168, #250, #269, #398 and #456)
+
+ Closes #474, #463, #387, #456, #398, #269, #250, #168, #152, #150 et #149
+
+ See merge request libtiff/libtiff!385
+
+2022-10-12 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_fix_#411_#413' into 'master'
+ tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (fixes #411, #413 and #426)
+
+ Closes #426, #413 et #411
+
+ See merge request libtiff/libtiff!383
+
+2022-10-10 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'TIFFAdvanceDirectory_mapped_uio' into 'master'
+ TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case
+
+ See merge request libtiff/libtiff!398
+
+2022-10-10 Even Rouault <even.rouault@spatialys.com>
+
+ TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case.
+ Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52309
+
+2022-10-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffinfo_parse_SubIFDs' into 'master'
+ tiffinfo: Updated to parse through SubIFDs and show their tags.
+
+ See merge request libtiff/libtiff!396
+
+2022-10-08 Su Laus <sulau@freenet.de>
+
+ tiffinfo: Updated to parse through SubIFDs and show their tags.
+
+2022-10-07 Roger Leigh <rleigh@codelibre.net>
+
+ Merge branch 'master' into 'master'
+ Moved linking of CMath::CMath into CMath_LIBRARY check
+
+ See merge request libtiff/libtiff!397
+
+2022-10-07 Frei Herr <herr.frei@googlemail.com>
+
+ Moved linking of CMath::CMath into CMath_LIBRARY check.
+
+2022-10-06 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'rational_precision2double_coverity-fix' into 'master'
+ rational_precision2double.c: Fix issue from Coverity Scan.
+
+ See merge request libtiff/libtiff!395
+
+2022-10-06 Su_Laus <sulau@freenet.de>
+
+ rational_precision2double.c: Fix issue from Coverity Scan.
+
+ Fix including module getopt.c twice with CMake and HAVE_GETOPT=false.
+ The "make-files" for the tools- and test- programmes include the module getopt.c once directly as additional source and then again by including port.lib.
+ This can be avoided by including getopt.c as source in port.lib within port\CMakeLists.txt not with PUBLIC but with PRIVATE.
+
+2022-10-06 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix-455_Improved-IFD-loop-handling' into 'master'
+ Improved IFD-Loop Handling (fixes #455)
+
+ Closes #455
+
+ See merge request libtiff/libtiff!386
+
+2022-10-06 Su Laus <sulau@freenet.de>
+
+ Improved IFD-Loop Handling (fixes #455)
+ IFD infinite looping was not fixed by MR 20 (see #455).
+ An improved IFD loop handling is proposed.
+
+ Basic approach:
+
+ - The order in the entire chain must be checked, and not only whether an offset has already been read once.
+ - To do this, pairs of directory number and offset are stored and checked.
+ - The offset of a directory number can change.
+ - TIFFAdvanceDirectory() must also perform an IFD loop check.
+ - TIFFCheckDirOffset() is replaced by _TIFFCheckDirNumberAndOffset().
+
+ Rules for the check:
+
+ - If an offset is already in the list, it must have the same IFD number. Otherwise it is an IDF loop.
+ - If the offset is not in the list and the IFD number is greater than there are list entries, a new list entry is added.
+ - Otherwise, the offset of the IFD number is updated.
+
+ Reference is also made to old bugzilla bug 2772 and MR 20, which did not solve the general issue.
+ This MR closes #455
+
+2022-10-05 Roger Leigh <rleigh@codelibre.net>
+
+ Merge branch 'fix-cmake-subproject' into 'master'
+ Fix CMake build to be compatible with FetchContent
+
+ See merge request libtiff/libtiff!394
+
+2022-10-04 Timothy Lyanguzov <theta682@gmail.com>
+
+ Apply 9 suggestion(s) to 3 file(s)
+
+2022-10-04 Jeremy Maitin-Shepard <jbms@google.com>
+
+ Fix CMake build to be compatible with FetchContent.
+ Recent versions of CMake have improved support for including
+ dependencies, using the FetchContent module, which allows a dependency
+ to be imported as a subproject and then later found automatically by
+ calls to `find_package`.
+
+ This change makes libtiff's CMake better behaved when used as a
+ sub-project:
+
+ - CMake has a single global namespace for all target names in all
+ sub-projects. This commit renames the following CMake targets:
+
+ - port -> tiff_port
+ - mkg3states -> tiff_mkg3states
+ - faxtable -> tiff_faxtable
+ - release -> tiff_release
+
+ - When building TIFF as a sub-project, it is not normally useful to
+ create install rules for its targets. This commit adds a
+ `tiff-install` option that controls whether the install rules are
+ added and defaults to OFF when libtiff is included as a sub-project.
+
+ - Previously, libtiff set `BUILD_SHARED_LIBS` to ON by default. With
+ this commit, that default is only set if libtiff is the top-level
+ project.
+
+ - When using `find_package(TIFF)`, the targets `TIFF::TIFF` and
+ `TIFF::CXX` are defined. This commit makes libtiff itself define
+ those targets as aliases, to allow other cmake projects to use
+ either `find_package` or `FetchContent` interchangeably.
+
+ - Adds ZSTD_HAVE_DECOMPRESS_STREAM variable which may be set to bypass
+ `check_symbol_exists` call. Fixes
+ https://gitlab.com/libtiff/libtiff/-/issues/472.
+
+2022-09-27 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'getimage_overflow' into 'master'
+ Update getimage to support reading large raster images
+
+ See merge request libtiff/libtiff!389
+
+2022-09-26 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'MinGW-warnings_ipctutil' into 'master'
+ Fix #458: MinGW Windows 64: warning because 'long' is a 32 bits type in...
+
+ Closes #458
+
+ See merge request libtiff/libtiff!391
+
+2022-09-26 Su Laus <sulau@freenet.de>
+
+ Fix #458: MinGW Windows 64: warning because 'long' is a 32 bits type in...
+
+2022-09-16 Eric Siegel <siegel.eric@gmail.com>
+
+ Update getimage to support large raster images.
+
+2022-09-08 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'typo_fix' into 'master'
+ tif_lzw.c: fix typo in code comment
+
+ See merge request libtiff/libtiff!387
+
+2022-09-08 Even Rouault <even.rouault@spatialys.com>
+
+ tif_lzw.c: fix typo in code comment.
+
+2022-08-30 Su_Laus <sulau@freenet.de>
+
+ Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value
+ In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed:
+
+ Behaviour for writing:
+ `NumberOfInks` MUST fit to the number of inks in the `InkNames` string.
+ `NumberOfInks` is automatically set when `InkNames` is set.
+ If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued.
+ If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued.
+
+ Behaviour for reading:
+ When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string.
+ If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued.
+ If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued.
+
+ This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow
+
+ This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456.
+
+ It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue.
+
+2022-08-25 Su_Laus <sulau@freenet.de>
+
+ tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (fixes #411 and #413)
+ tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S.
+
+ Code analysis:
+
+ With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[].
+ In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) .
+
+ Execution of the else-clause often leads to buffer-overflows.
+
+ Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows.
+
+ The MR solves issues #411 and #413.
+
+2022-08-21 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tiffcrop_S-option_mutually_exclusive' into 'master'
+ tiffcrop: -S option mutually exclusive (fixes #349, #414, #422, #423, #424)
+
+ Closes #424, #423, #422, #414 et #349
+
+ See merge request libtiff/libtiff!378
+
+2022-08-20 Su_Laus <sulau@freenet.de>
+
+ tiffcrop -S option: Make decision simpler.
+
+2022-08-20 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'remove_death_commented_code' into 'master'
+ Remove dead code from tif_dirread.c, tif_dirwrite.c and tif_getimage.c
+
+ See merge request libtiff/libtiff!380
+
+2022-08-20 Su Laus <sulau@freenet.de>
+
+ Remove dead code from tif_dirread.c, tif_dirwrite.c and tif_getimage.c.
+
+2022-08-16 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'coverity_fixes' into 'master'
+ Silence Coverity Scan false positive warnings about out-of-bounds access
+
+ See merge request libtiff/libtiff!379
+
+2022-08-16 Even Rouault <even.rouault@spatialys.com>
+
+ tif_zip.c: silence Coverity Scan false positive warnings about out-of-bounds access (CID 1491190, 1491197, 1491201)
+
+ tif_dirread.c: silence Coverity Scan false positive warnings about out-of-bounds access (CID 1491182, 1491186)
+
+2022-08-16 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'default_tag_values_extended' into 'master'
+ Presetting of default tag values extended (e.g. PlanarConfig). (fixes #449)
+
+ Closes #449
+
+ See merge request libtiff/libtiff!377
+
+2022-08-16 Su Laus <sulau@freenet.de>
+
+ Presetting of default tag values extended (e.g. PlanarConfig). (fixes #449)
+
+2022-08-15 Su_Laus <sulau@freenet.de>
+
+ According to Richard Nolde https://gitlab.com/libtiff/libtiff/-/issues/401#note_877637400 the tiffcrop option „-S“ is also mutually exclusive to the other crop options (-X|-Y), -Z and -z.
+ This is now checked and ends tiffcrop if those arguments are not mutually exclusive.
+
+ This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'warning_fix' into 'master'
+ Fix warning about shadowing
+
+ See merge request libtiff/libtiff!376
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Fix warning about shadowing.
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_225' into 'master'
+ Deal with RichTIFFIPTC tag written with LONG type (fixes #225)
+
+ Closes #225
+
+ See merge request libtiff/libtiff!374
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'Writing_IFD8_to_ClassicTIFF_bugfix' into 'master'
+ Correcting defects reported by Coverity Scan for MR !369
+
+ See merge request libtiff/libtiff!375
+
+2022-08-09 Su Laus <sulau@freenet.de>
+
+ Correcting defects reported by Coverity Scan for MR !369.
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'fix_442_Writing_IFD8_to_ClassicTIFF' into 'master'
+ TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (fixes #442)
+
+ Closes #442
+
+ See merge request libtiff/libtiff!369
+
+2022-08-09 Su Laus <sulau@freenet.de>
+
+ TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (fixes #442)
+
+2022-08-09 Even Rouault <even.rouault@spatialys.com>
+
+ Deal with RichTIFFIPTC tag written with LONG type (fixes #225)
+
+2022-08-07 Roger Leigh <rleigh@codelibre.net>
+
+ Merge branch 'manpage-functions-added' into 'master'
+ doc: Missing public functions added to TIFF documentation in Sphinx
+
+ See merge request libtiff/libtiff!372
+
+2022-08-07 Su Laus <sulau@freenet.de>
+
+ doc: Missing public functions added to TIFF documentation in Sphinx.
+
+2022-07-29 Even Rouault <even.rouault@spatialys.com>
+
+ Merge branch 'tifjpeg_version_check' into 'master'
+ tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number
(Patch may be truncated, please check the link at the top of this post.)