Fix comparison for max negative float value.

This commit is contained in:
Dirk Lemstra 2020-09-11 10:41:11 +02:00
parent 7b840002c1
commit c0e310bc3f
No known key found for this signature in database
GPG Key ID: 0057FEA4B5173E68

View File

@ -639,7 +639,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF* tif, TIFFDirEntry* d
err=TIFFReadDirEntryCheckedDouble(tif,direntry,&m);
if (err!=TIFFReadDirEntryErrOk)
return(err);
if ((m > FLT_MAX) || (m < FLT_MIN))
if ((m > FLT_MAX) || (m < -FLT_MAX))
return(TIFFReadDirEntryErrRange);
*value=(float)m;
return(TIFFReadDirEntryErrOk);