diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-17 19:53:13 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-17 19:53:13 +0200 |
| commit | 91d23e65ace9872a785f66db756d77e01381556f (patch) | |
| tree | a1f062c4c326db4ced6ffb54102c60c6cd410824 /src | |
| parent | d2f661fc99615a33d72bb0120a14bca2aaced221 (diff) | |
| download | PROJ-91d23e65ace9872a785f66db756d77e01381556f.tar.gz PROJ-91d23e65ace9872a785f66db756d77e01381556f.zip | |
eqdc: avoid potential division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17190
Diffstat (limited to 'src')
| -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; } |
