diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-06-30 15:11:06 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-07-04 12:24:58 +0200 |
commit | 5428d253ed53aafe7b523c1fb3937376538a4949 (patch) | |
tree | 2e2fc68d240ae99238945be9f68fe3046a50e451 /src/3rdparty/libtiff/libtiff/tif_dirwrite.c | |
parent | 32d5b3dcd33c2ae724a13040838313f96cf07966 (diff) |
Update bundled libtiff to version 4.5.1
[ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.5.1
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I32bb074b6ba599e857b10e1fa637da36b025d12b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_dirwrite.c')
-rw-r--r-- | src/3rdparty/libtiff/libtiff/tif_dirwrite.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_dirwrite.c b/src/3rdparty/libtiff/libtiff/tif_dirwrite.c index beebd11..a6a485f 100644 --- a/src/3rdparty/libtiff/libtiff/tif_dirwrite.c +++ b/src/3rdparty/libtiff/libtiff/tif_dirwrite.c @@ -320,6 +320,7 @@ int TIFFRewriteDirectory(TIFF *tif) * Find and zero the pointer to this directory, so that TIFFLinkDirectory * will cause it to be added after this directories current pre-link. */ + uint64_t torewritediroff = tif->tif_diroff; if (!(tif->tif_flags & TIFF_BIGTIFF)) { @@ -387,6 +388,8 @@ int TIFFRewriteDirectory(TIFF *tif) nextdir = nextnextdir; } } + /* Remove skipped offset from IFD loop directory list. */ + _TIFFRemoveEntryFromDirectoryListByOffset(tif, torewritediroff); } else { @@ -456,6 +459,8 @@ int TIFFRewriteDirectory(TIFF *tif) nextdir = nextnextdir; } } + /* Remove skipped offset from IFD loop directory list. */ + _TIFFRemoveEntryFromDirectoryListByOffset(tif, torewritediroff); } /* @@ -1114,7 +1119,12 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone, if (tif->tif_dataoff & 1) tif->tif_dataoff++; if (isimage) - tif->tif_curdir++; + { + if (tif->tif_curdir == TIFF_NON_EXISTENT_DIR_NUMBER) + tif->tif_curdir = 0; + else + tif->tif_curdir++; + } } if (isimage) { |