Return infinite distance when denominator is zero.

This commit is contained in:
Dirk Lemstra 2019-06-29 18:44:38 +02:00
parent 424972255f
commit b381187db6
No known key found for this signature in database
GPG Key ID: 0057FEA4B5173E68

View File

@ -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