Merge branch 'fix-division-by-zero' into 'master'
Return infinite distance when denominator is zero. See merge request libtiff/libtiff!85
This commit is contained in:
commit
ab3204b167
@ -5717,7 +5717,7 @@ TIFFFetchSubjectDistance(TIFF* tif, TIFFDirEntry* dir)
|
||||
TIFFSwabArrayOfLong(m.i,2);
|
||||
if (m.i[0]==0)
|
||||
n=0.0;
|
||||
else if (m.i[0]==0xFFFFFFFF)
|
||||
else if (m.i[0]==0xFFFFFFFF || m.i[1]==0)
|
||||
/*
|
||||
* XXX: Numerator 0xFFFFFFFF means that we have infinite
|
||||
* distance. Indicate that with a negative floating point
|
||||
|
Loading…
Reference in New Issue
Block a user