diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-18 16:57:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-18 16:57:19 +0200 |
| commit | 72203ca68e123a237c8c748d39131b702ea4b646 (patch) | |
| tree | 38d1214e399eaaf4e173ad5d13a3820364065c1d /src/projections/eqdc.cpp | |
| parent | d2f661fc99615a33d72bb0120a14bca2aaced221 (diff) | |
| parent | bc53524cfbde95ecf6bb134984e68eb715d11c2b (diff) | |
| download | PROJ-72203ca68e123a237c8c748d39131b702ea4b646.tar.gz PROJ-72203ca68e123a237c8c748d39131b702ea4b646.zip | |
Merge pull request #1620 from rouault/ossfuzz_17190_and_others
Assorted set of fixes for boring oss-fuzz related errors (mostly divisions by zero in odd situations)
Diffstat (limited to 'src/projections/eqdc.cpp')
| -rw-r--r-- | src/projections/eqdc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/projections/eqdc.cpp b/src/projections/eqdc.cpp index e050a593..00aacfda 100644 --- a/src/projections/eqdc.cpp +++ b/src/projections/eqdc.cpp @@ -117,6 +117,8 @@ PJ *PROJECTION(eqdc) { } else { if (secant) Q->n = (cosphi - cos(Q->phi2)) / (Q->phi2 - Q->phi1); + if (Q->n == 0) + return destructor (P, PJD_ERR_CONIC_LAT_EQUAL); Q->c = Q->phi1 + cos(Q->phi1) / Q->n; Q->rho0 = Q->c - P->phi0; } |
