Changes in TIFF v3.9.3
======================

.. table:: References
  :widths: auto

  ======================  ==========================================
  Current Version         v3.9.3 (:tag:`Release-v3-9-3`)
  Previous Version        :doc:`v3.9.2 <v3.9.2>`
  Master Download Site    `<https://download.osgeo.org/libtiff/>`_
  Master HTTP Site        `<http://www.simplesystems.org/libtiff/>`_
  ======================  ==========================================


This document describes the changes made to the software between the
*previous* and *current* versions (see above).  If you don't
find something listed here, then it was not done in this timeframe, or
it was not considered important enough to be mentioned.  The following
information is located here:


Major changes
-------------

* Fixes for :cve:`2010-1411`.

* Various reported bug fixes.


Software configuration changes
------------------------------

* libtool is updated to version 2.2.10.


Library changes
---------------

* Fix a couple of issues that trigger failures in some
  cases when using :c:func:`TIFFReadScanline` with JPEG compressed
  subsampled ycbcr images.
  :bugzilla:`1936`

* Ensure tile and scanline sizes are reset when moving to
  new directories.
  :bugzilla:`1936`

* Do not generate a ``JPEGTables`` tag when creating the JPEG
  TIFF as is is not required in order to prevent it from being
  unused and filled with invalid data.  (Leave it to be
  generated by later activity.)
  :bugzilla:`2135`

* Don't return error on badly-terminated MMR strips.
  :bugzilla:`2029`

* Have :c:macro:`TIFFTAG_REFERENCEBLACKWHITE` always print 6 floats
  instead of ``2*SamplesPerPixel``.
  :bugzilla:`2186`

* Ensure that JPEG quality is always set in
  :c:func:`JPEGPreEncode`, not just when we want to output local tables.
  Otherwise the quality used during compression may not be right
  and might not match the tables in the tables tag.  This bug
  only occurs when seeking between directories in the midst of
  writing blocks.  :gdal-trac:`3539`

* OJPEG: Report an error and avoid a crash if the input
  file is so broken that the strip offsets are not defined.

* Eliminate FAX3 decoder buffer overrun possibility
  (:cve:`2010-1411`).

* Restore ``ReferenceBlackWhite`` as a non-custom field.  This
  avoids a multi-thread reentrancy problem as well as fixing
  output of wrong tag value due to redundant definitions for the
  same tag in the :c:expr:`tiffFieldInfo[]` array.  Resolves
  :bugzilla:`2185`

Tools changes
-------------

* :program:`tiff2pdf`: Write the JPEG SOI headers into the TIFF strip
  data rather than skipping them.  This fixes the ability to view in
  Acrobat Reader, Evince, and Ghostscript.
  :bugzilla:`2135`

* :program:`ppm2tiff`: While case for parsing comment line
  requires extra parenthesis to work as expected.  Reported by
  Thomas Sinclair.

* :program:`tiffcp`: add a new option ``-x`` to force merged tiff
  file ``PAGENUMBER`` value in sequence for users who care the page
  sequence, this will also prevent :program:`tiff2pdf` from creating pdf file from
  the merged tiff file with wrong page sequence.

* :program:`tiffcp`: Applied Tom Lane's patch to reject YCbCr
  subsampled data since :program:`tiffcp` currently doesn't support it.
  :bugzilla:`2097`


Contributed software changes
----------------------------

* None
