Opened 7 years ago
Closed 7 years ago
#6931 closed defect (fixed)
ogr_geo_utils.cpp: Check LatA == 0.0 and cos_Heading == 0.0? Or with epsilons?
Reported by: | Kurt Schwehr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Even,
Did you really want an exact == 0.0 for these?
if( cos_complement_LatA == 0.0 && cos_Heading == 0.0 )
https://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogr_geo_utils.cpp?rev=39193#L170
Note:
See TracTickets
for help on using tickets.
I'm not sure of all conditions that can lead to dfDenomin being 0, and appropriate thresholds. And potentially when it is very close to 0 the result might be inaccurate/wrong too. This function is indeed a bit fragile on corner cases that oss-fuzz finds. But for real world cases, those situations are quite unlikely. So I'm basically on a mode of "do fixes as much as oss-fuzz complains and not more".