Skip to content

Commit

Permalink
GTiff: do not query TIFFTAG_TRANSFERFUNCTION if m_nBitsPerSample > 24
Browse files Browse the repository at this point in the history
Fixes #10875
  • Loading branch information
rouault committed Sep 26, 2024
1 parent 5c9f5c4 commit ae7e834
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frmts/gtiff/gtiffdataset_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4760,7 +4760,8 @@ void GTiffDataset::LoadICCProfile()
{
if (TIFFGetField(m_hTIFF, TIFFTAG_WHITEPOINT, &pWP))
{
if (!TIFFGetFieldDefaulted(m_hTIFF, TIFFTAG_TRANSFERFUNCTION, &pTFR,
if (m_nBitsPerSample > 24 ||
!TIFFGetFieldDefaulted(m_hTIFF, TIFFTAG_TRANSFERFUNCTION, &pTFR,
&pTFG, &pTFB) ||
pTFR == nullptr || pTFG == nullptr || pTFB == nullptr)
{
Expand Down

0 comments on commit ae7e834

Please sign in to comment.