| 1 |
Changes in TIFF v4.7.0 |
| 2 |
====================== |
| 3 |
|
| 4 |
.. table:: References |
| 5 |
:widths: auto |
| 6 |
|
| 7 |
====================== ========================================== |
| 8 |
Current Version v4.7.0 (:tag:`v4.7.0`) |
| 9 |
Previous Version :doc:`v4.6.0 <v4.6.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 |
This version restores in the default build the availability of the tools that |
| 24 |
had been dropped in v4.6.0 (cf :ref:`rfc2_restoring_needed_tools`) |
| 25 |
|
| 26 |
Software configuration changes |
| 27 |
------------------------------ |
| 28 |
|
| 29 |
- autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection |
| 30 |
|
| 31 |
- autoconf build: fix error when running make clean (fixes :issue:`630`) |
| 32 |
|
| 33 |
- autoconf build: back off the minimum required automake version to 1.11 |
| 34 |
|
| 35 |
- autoconf.ac: fix detection of windows.h for mingw (fixes :issue:`605`) |
| 36 |
|
| 37 |
- libtiff-4.pc: Fix `Requires.private` missing `Lerc`. It provides a `.pc` file starting from version 4 |
| 38 |
(in autoconf builds, we assume that liblerc is at least version 4) |
| 39 |
|
| 40 |
- CMake: Fix TIFF_INCLUDE_DIRS |
| 41 |
|
| 42 |
- CMake: MinGW compilers don't need a .def file for shared library |
| 43 |
|
| 44 |
- CMake: move libdeflate and Lerc to Requires.private |
| 45 |
|
| 46 |
- CMake: enable resource compilation on all Windows. |
| 47 |
|
| 48 |
Library changes |
| 49 |
--------------- |
| 50 |
|
| 51 |
New/improved functionalities: |
| 52 |
|
| 53 |
- Add ``TIFFOpenOptionsSetMaxCumulatedMemAlloc()``. This function complements |
| 54 |
``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated |
| 55 |
memory allocations in byte, for a given TIFF handle, that libtiff internal |
| 56 |
memory allocation functions are allowed. |
| 57 |
|
| 58 |
API/ABI breaks: |
| 59 |
|
| 60 |
* None |
| 61 |
|
| 62 |
Bug fixes: |
| 63 |
|
| 64 |
- TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged. |
| 65 |
|
| 66 |
- TIFFXYZToRGB: avoid integer overflow (fixes :issue:`644`) |
| 67 |
|
| 68 |
- uv_decode() and uv_encode(): avoid potential out-of-bounds array index |
| 69 |
(fixes :issue:`645`) |
| 70 |
|
| 71 |
- Fix cases where tif_curdir is set incorrectly. |
| 72 |
Fix cases where the current directory number (tif_curdir) is set inconsistently |
| 73 |
or incorrectly, depending on the previous history. |
| 74 |
|
| 75 |
- TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if |
| 76 |
setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) |
| 77 |
output buffer if failure (fixes :issue:`375`) |
| 78 |
|
| 79 |
- OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes :issue:`183`) |
| 80 |
|
| 81 |
- ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL |
| 82 |
|
| 83 |
- LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values |
| 84 |
|
| 85 |
- tif_fax3.c: error out after a number of times end-of-file has been reached |
| 86 |
(fixes :issue:`583`) |
| 87 |
|
| 88 |
- LZW: avoid warning about misaligned address with UBSAN (fixes :issue:`616`) |
| 89 |
|
| 90 |
- TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row |
| 91 |
(fixes :issue:`622`, CVE-2023-52356) |
| 92 |
|
| 93 |
- tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests |
| 94 |
|
| 95 |
- Avoid FPEs (division by zero) in tif_getimage.c. |
| 96 |
|
| 97 |
- Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros |
| 98 |
by checking for denominator not zero before macros are executed. (fixes :issue:`628`) |
| 99 |
|
| 100 |
- Add non-zero check before division in TIFFComputeStrip() |
| 101 |
|
| 102 |
- Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active |
| 103 |
|
| 104 |
- Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` |
| 105 |
|
| 106 |
- Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated |
| 107 |
memory in the tif-structure. |
| 108 |
|
| 109 |
- For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is |
| 110 |
set at the end to avoid deleting the last character. (fixes :issue:`579`) |
| 111 |
|
| 112 |
- Check return value of _TIFFCreateAnonField(). (fixes :issue:`624`, CVE-2024-7006) |
| 113 |
|
| 114 |
- Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857) |
| 115 |
|
| 116 |
- Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes :issue:`618`) |
| 117 |
|
| 118 |
- tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes :issue:`608`) |
| 119 |
|
| 120 |
Other changes: |
| 121 |
|
| 122 |
- Fix warnings with GCC 14 |
| 123 |
|
| 124 |
- tif_dir.c: Log source file, line number, and input tif for directory count error (fixes :issue:`627`) |
| 125 |
|
| 126 |
- Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() |
| 127 |
changed to using set_field_type. |
| 128 |
|
| 129 |
- tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups |
| 130 |
|
| 131 |
- Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() |
| 132 |
|
| 133 |
- Remove support for _MSC_VER < 1500. |
| 134 |
|
| 135 |
- Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ |
| 136 |
|
| 137 |
|
| 138 |
Documentation |
| 139 |
------------- |
| 140 |
|
| 141 |
- Amend manpages for changes in current directory index behaviour |
| 142 |
|
| 143 |
- Note on using TIFFFlush() before TIFFClose() to check that the data has been |
| 144 |
successfully written to the file. (fixes :issue:`506`) |
| 145 |
|
| 146 |
- Update TIFF documentation about TIFFOpenOptions.rst and |
| 147 |
TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes |
| 148 |
(relates to CVE-2024-7006) |
| 149 |
|
| 150 |
Tools changes |
| 151 |
------------- |
| 152 |
|
| 153 |
Re-added tools: |
| 154 |
|
| 155 |
- fax2ps |
| 156 |
- fax2tiff |
| 157 |
- pal2rgb |
| 158 |
- ppm2tiff |
| 159 |
- raw2tiff |
| 160 |
- rgb2ycbcr (not installed) |
| 161 |
- thumbnail (not installed) |
| 162 |
- tiff2bw |
| 163 |
- tiff2rgba |
| 164 |
- tiffcmp |
| 165 |
- tiffcrop |
| 166 |
- tiffdither |
| 167 |
- tiffgt |
| 168 |
- tiffmedian |
| 169 |
- tiff2ps |
| 170 |
- tiff2pdf |
| 171 |
|
| 172 |
New/improved functionality: |
| 173 |
|
| 174 |
- tiff2rgba: Add background gradient option for alpha compositing |
| 175 |
- tiffcp: -i flag restored |
| 176 |
|
| 177 |
Bug fixes: |
| 178 |
|
| 179 |
- tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054 |
| 180 |
- tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" |
| 181 |
- tiffcrop: fix buffer overflows, use after free (fixes :issue:`542`, |
| 182 |
:issue:`550`, :issue:`552`) |
| 183 |
- tiff2pdf: address Coverity scan issues |
| 184 |
- tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF |
| 185 |
- tiff2pdf: fix issue with JPEG restart-interval marker when converting from |
| 186 |
JPEG-compressed files (fixes :issue:`539`) |
| 187 |
- tiff2pdf: red and blue were being swapped for RGBA decoding (fixes :issue:`253`) |
| 188 |
- tiff2pdf: fixes :issue:`596` |
| 189 |
- thumbnail: address Coverity scan issues |
| 190 |
- tiffcp: Add check for limitMalloc return to fix Coverity 1603334 |
| 191 |
- tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG |
| 192 |
- tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs :issue:`571`) |
| 193 |
- tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, |
| 194 |
REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG |
| 195 |
- tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`) |
| 196 |
- Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. |
| 197 |
- fax2ps and fax2tiff: memory leak fixes (fixes :issue:`476`) |
| 198 |
- tiffmedian: memory leak fixes (fixes :issue:`599`) |
| 199 |
- fax2tiff: fix EOFB interpretation (fixes :issue:`191`) |
| 200 |
- fax2tiff: fix issue with unreasonable width input (fixes :issue:`249`) |
| 201 |
- tiffcp and tiffcrop: fixes :issue:`228` |
| 202 |
- tiff2rgba: fixes :issue:`469` |
| 203 |
- tiffdither: fixes :issue:`473` |
| 204 |
- tiffdump: fix wrong printf formatter in error message (Coverity 1472932) |
| 205 |
- tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997) |
| 206 |
- tifcp/tiffset: use correct format specifiers |
| 207 |
|
| 208 |
Changes to contributed and unsupported tools |
| 209 |
-------------------------------------------- |
| 210 |
|
| 211 |
- contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680) |