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 b89b28d commit 61555de
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 @@ -4763,7 +4763,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 61555de

Please sign in to comment.