| 1 |
Changes in TIFF v4.7.1 |
| 2 |
====================== |
| 3 |
|
| 4 |
.. table:: References |
| 5 |
:widths: auto |
| 6 |
|
| 7 |
====================== ========================================== |
| 8 |
Current Version v4.7.1 (:tag:`v4.7.1`) |
| 9 |
Previous Version :doc:`v4.7.0 <v4.7.0>` |
| 10 |
Primary Download Site `<https://download.osgeo.org/libtiff/>`_ |
| 11 |
Home HTTP Site #1 `<http://www.simplesystems.org/libtiff/>`_ |
| 12 |
Home HTTP Site #2 `<https://libtiff.gitlab.io/libtiff/>`_ |
| 13 |
====================== ========================================== |
| 14 |
|
| 15 |
This document provides a summary of significant changes made to the |
| 16 |
software between the *previous* and *current* versions (see |
| 17 |
above). A fully-detailed change summary is provided by the :file:`ChangeLog` file |
| 18 |
included in the release package and by the Git commit history. |
| 19 |
|
| 20 |
Major changes |
| 21 |
------------- |
| 22 |
|
| 23 |
None |
| 24 |
|
| 25 |
Software configuration changes |
| 26 |
------------------------------ |
| 27 |
|
| 28 |
* Define HAVE_JPEGTURBO_DUAL_MODE_8_12 and LERC_STATIC in tif_config.h. |
| 29 |
* CMake: define WORDS_BIGENDIAN via tif_config.h |
| 30 |
* doc/CMakeLists.txt: remove useless cmake_minimum_required() |
| 31 |
* CMake: fix build with LLVM/Clang 17 (fixes :issue:`651`) |
| 32 |
* CMake: set CMP0074 new policy |
| 33 |
* Set LINKER_LANGUAGE for C targets with C deps |
| 34 |
* Export tiffxx cmake target (fixes :issue:`674`) |
| 35 |
* autogen.sh: Enable verbose wget. |
| 36 |
* configure.ac: Syntax updates for Autoconf 2.71 |
| 37 |
* autogen.sh: Re-implement based on autoreconf. Failure to update |
| 38 |
config.guess/config.sub does not return error (fixes :issue:`672`) |
| 39 |
* CMake: fix CMake 4.0 warning when minimum required version is < 3.10. |
| 40 |
* CMake: Add build option tiff-static (fixes :issue:`709`) |
| 41 |
|
| 42 |
Library changes |
| 43 |
--------------- |
| 44 |
|
| 45 |
New/improved functionalities: |
| 46 |
|
| 47 |
* Add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control about |
| 48 |
emitting warnings for unknown tags. No longer emit warnings about unknown |
| 49 |
tags by default |
| 50 |
|
| 51 |
* tif_predict.c: speed-up decompression in some cases. |
| 52 |
|
| 53 |
API/ABI breaks: |
| 54 |
|
| 55 |
* None |
| 56 |
|
| 57 |
Bug fixes: |
| 58 |
|
| 59 |
* tif_fax3: For fax group 3 data if no EOL is detected, reading is retried |
| 60 |
without synchronisation for EOLs. (fixes :issue:`54`) |
| 61 |
|
| 62 |
* Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. |
| 63 |
Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. |
| 64 |
Improving handling when field_name = NULL. |
| 65 |
(fixes :issue:`532`) |
| 66 |
|
| 67 |
* tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in |
| 68 |
the DNG 1.7 specification |
| 69 |
|
| 70 |
* TIFFWriteDirectorySec: Increment string length for ASCII tags for codec tags |
| 71 |
defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags. |
| 72 |
(fixes :issue:`648`) |
| 73 |
|
| 74 |
* Do not error out on a tag whose tag count value is zero, just issue a warning. |
| 75 |
Fix parsing a private tag 0x80a6 (fixes :issue:`647`) |
| 76 |
|
| 77 |
* TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24 |
| 78 |
(Fixes https://github.com/OSGeo/gdal/issues/10875) |
| 79 |
|
| 80 |
* tif_getimage.c: Remove unnecessary calls to TIFFRGBAImageOK() |
| 81 |
(fixes :issue:`175`) |
| 82 |
|
| 83 |
* Fix writing a Predictor=3 file with non-native endianness |
| 84 |
|
| 85 |
* _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds |
| 86 |
read / nullptr dereference) in case of out-of-memory situation when dealing |
| 87 |
with custom tags (fixes :issue:`663`) |
| 88 |
|
| 89 |
* tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal |
| 90 |
1 and PlanarConfiguration = Contiguous (fixes :issue:`26`) |
| 91 |
|
| 92 |
* tif_fax3.c: error out after a number of times end-of-line or unexpected bad |
| 93 |
code words have been reached. (fixes :issue:`670`) |
| 94 |
|
| 95 |
* Fix memory leak in TIFFSetupStrips() (fixes :issue:`665`) |
| 96 |
|
| 97 |
* tif_zip.c: Provide zlib allocation functions. |
| 98 |
Otherwise for zlib built with -DZ_SOLO inflating will fail. |
| 99 |
|
| 100 |
* Fix memory leak in _TIFFSetDefaultCompressionState. (fixes :issue:`676`) |
| 101 |
|
| 102 |
* tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if |
| 103 |
"prediction" is enabled. Use extra working buffer in PredictorEncodeRow(). |
| 104 |
(fixes :issue:`5`) |
| 105 |
|
| 106 |
* tif_getimage.c: update some integer overflow checks (fixes :issue:`79`) |
| 107 |
|
| 108 |
* tif_getimage.c: Fix buffer underflow crash for less raster rows at |
| 109 |
TIFFReadRGBAImageOriented() (fixes :issue:`704`) |
| 110 |
|
| 111 |
* TIFFReadRGBAImage(): several fixes to avoid buffer overflows. |
| 112 |
|
| 113 |
* Correct passing arguments to TIFFCvtIEEEFloatToNative() and |
| 114 |
TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. (fixes |
| 115 |
:issue:`699`) |
| 116 |
|
| 117 |
* LZWDecode(): avoid nullptr dereference when trying to read again after EOI |
| 118 |
marker has been found with remaining output bytes (fixes :issue:`698`) |
| 119 |
|
| 120 |
* TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return. |
| 121 |
|
| 122 |
* TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when |
| 123 |
clearing tif_rawdata (fixes :issue:`711`) |
| 124 |
|
| 125 |
* JPEGEncodeRaw(): error out if a previous scanline failed to be written, to |
| 126 |
avoid out-of-bounds access (fixes :issue:`714`) |
| 127 |
|
| 128 |
* tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for |
| 129 |
8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually |
| 130 |
released as 3.0. (fixes :issue:`717`) |
| 131 |
|
| 132 |
* add assert for TIFFReadCustomDirectory infoarray check. |
| 133 |
|
| 134 |
Other changes: |
| 135 |
|
| 136 |
* tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value |
| 137 |
|
| 138 |
* tif_lzw.c / tif_packbits.c: use NULL instead of 0. |
| 139 |
|
| 140 |
* Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY |
| 141 |
macros to disable compiling write-support for those codecs. |
| 142 |
|
| 143 |
* tif_lerc.c: add missing casts |
| 144 |
|
| 145 |
* Merge several functions implemented twice in different modules. |
| 146 |
(see :issue:`154`) |
| 147 |
|
| 148 |
* Remove get_field_type form TIFFField structure because it is not used |
| 149 |
anymore and rename other parameter to set_get_field_type |
| 150 |
|
| 151 |
* Silence some Coverity Scan warnigs and mark already dismissed ones. |
| 152 |
|
| 153 |
* References to codec libraries updated and missing codec compile defines |
| 154 |
(tiffconf.h) added. |
| 155 |
|
| 156 |
* Move mkg3states under libtiff/tools. (fixes :issue:`708`) |
| 157 |
|
| 158 |
* tiff_itrunc(): don't use rand() to please Coverity Scan. |
| 159 |
|
| 160 |
* tiffio.h: fix compilation with LOGLUV_PUBLIC=0 |
| 161 |
|
| 162 |
* LICENSE.md: Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) |
| 163 |
(fixes :issue:`431`) |
| 164 |
|
| 165 |
Documentation |
| 166 |
------------- |
| 167 |
|
| 168 |
* TIFFRGBAImage.rst note added for incorrect saving of images with TIFF |
| 169 |
orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster. |
| 170 |
|
| 171 |
* TIFFRGBAImage.rst note added about un-associated alpha handling |
| 172 |
(fixes :issue:`67`) |
| 173 |
|
| 174 |
* Update "Defining New TIFF Tags" description. (fixes :issue:`642`) |
| 175 |
|
| 176 |
* Fix return type of TIFFReadEncodedTile() |
| 177 |
|
| 178 |
* Update the documentation to reflect deprecated typedefs. |
| 179 |
|
| 180 |
* TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for |
| 181 |
image data and not for IFD data. |
| 182 |
|
| 183 |
* Update documentation on re-entrancy and thread safety. |
| 184 |
|
| 185 |
* Remove dead links to no more existing Awaresystems web-site. |
| 186 |
|
| 187 |
* Updating BigTIFF specification and some miscelaneous editions. |
| 188 |
|
| 189 |
* Replace some last links and remove last todos. |
| 190 |
|
| 191 |
* Added hints for correct allocation of TIFFYCbCrtoRGB structure and its |
| 192 |
associated buffers. (fixes :issue:`681`) |
| 193 |
|
| 194 |
* Added chapter to "Using the TIFF Library" with links to handling multi-page |
| 195 |
TIFF and custom directories. (fixes :issue:`43`) |
| 196 |
|
| 197 |
* update TIFFOpen.rst with the return values of mapproc and unmapproc. |
| 198 |
(fixes :issue:`12`) |
| 199 |
|
| 200 |
Tools changes |
| 201 |
------------- |
| 202 |
|
| 203 |
New/improved functionality: |
| 204 |
|
| 205 |
* tiffinfo: add a -W switch to warn about unknown tags. |
| 206 |
|
| 207 |
* tiffdither: process all pages in input TIFF file. |
| 208 |
|
| 209 |
Bug fixes: |
| 210 |
|
| 211 |
* ppm2tiff: Fix bug in `pack_words` trailing bytes, where last two bytes of |
| 212 |
each line were written wrongly. (fixes :issue:`467`) |
| 213 |
|
| 214 |
* fax2ps: fix regression of commit 28c38d648b64a66c3218778c4745225fe3e3a06d |
| 215 |
where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer |
| 216 |
(fixes :issue:`649`) |
| 217 |
|
| 218 |
* tiff2pdf: Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH (fixes :issue:`650`) |
| 219 |
|
| 220 |
* tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by |
| 221 |
zero. (fixes :issue:`654`) |
| 222 |
|
| 223 |
* tiff2pdf: avoid null pointer dereference. (fixes :issue:`741`) |
| 224 |
|
| 225 |
* Improve non-secure integer overflow check (comparison of division result |
| 226 |
with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. (fixes :issue:`546`) |
| 227 |
|
| 228 |
* tiff2rgba: fix some "a partial expression can generate an overflow before it |
| 229 |
is assigned to a broader type" warnings. (fixes :issue:`682`) |
| 230 |
|
| 231 |
* tiffdither/tiffmedian: Don't skip the first line of the input image. |
| 232 |
(fixes :issue:`703`) |
| 233 |
|
| 234 |
* tiffdither: avoid out-of-bounds read identified in :issue:`733` |
| 235 |
|
| 236 |
* tiffmedian: error out if TIFFReadScanline() fails (fixes :issue:`707`) |
| 237 |
|
| 238 |
* tiffmedian: close input file. (fixes :issue:`735`) |
| 239 |
|
| 240 |
* thumbail: avoid potential out of bounds access (fixes :issue:`715`) |
| 241 |
|
| 242 |
* tiffcrop: close open TIFF files and release allocated buffers before exiting |
| 243 |
in case of error to avoid memory leaks. (fixes :issue:`716`) |
| 244 |
|
| 245 |
* tiffcrop: fix double-free and memory leak exposed by :issue:`721` |
| 246 |
|
| 247 |
* tiffcrop: avoid buffer overflow. (fixes :issue:`740`) |
| 248 |
|
| 249 |
* tiffcrop: avoid nullptr dereference. (fixes :issue:`734`) |
| 250 |
|
| 251 |
* tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression |
| 252 |
\*datamem to PrintData, which uses it as a divisor or modulus. |
| 253 |
|
| 254 |
* tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and |
| 255 |
TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference. |
| 256 |
(fixes :issue:`718`) |
| 257 |
|
| 258 |
* tiffcmp: fix memory leak when second file cannot be opened. |
| 259 |
(fixes :issue:`718` and :issue:`729`) |
| 260 |
|
| 261 |
* tiffcp: fix setting compression level for lossless codecs. |
| 262 |
(fixes :issue:`730`) |
| 263 |
|
| 264 |
* raw2tiff: close input file before exit (fixes :issue:`742`) |
| 265 |
|
| 266 |
Changes to contributed and unsupported tools |
| 267 |
-------------------------------------------- |
| 268 |
|
| 269 |
* addtiffo: Fixing MSVC compiler warnings |
| 270 |
|
| 271 |
* Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc. |
| 272 |
|
| 273 |
* oss-fuzz: fix memory leak in fuzz target. |