diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-19 13:08:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-19 13:08:02 +0200 |
| commit | a2a098dd9dc7f0d5acdb90e89612a4aa35b04101 (patch) | |
| tree | 8588cb33b5267f6bc78b7efbd3de02ad715ee6df /src/ell_set.cpp | |
| parent | ae6f1a1760e8393b673b6e63600c4842f4fde261 (diff) | |
| parent | 02919fb712a84d83780bffd5f2ebdc44451f48b4 (diff) | |
| download | PROJ-a2a098dd9dc7f0d5acdb90e89612a4aa35b04101.tar.gz PROJ-a2a098dd9dc7f0d5acdb90e89612a4aa35b04101.zip | |
Merge pull request #1622 from OSGeo/backport-1620-to-6.2
[Backport 6.2] Assorted set of fixes for boring oss-fuzz related errors (mostly divisions by zero in odd situations)
Diffstat (limited to 'src/ell_set.cpp')
| -rw-r--r-- | src/ell_set.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ell_set.cpp b/src/ell_set.cpp index 0d7fb6d5..d2930ca4 100644 --- a/src/ell_set.cpp +++ b/src/ell_set.cpp @@ -389,6 +389,9 @@ static int ellps_spherification (PJ *P) { return proj_errno_set (P, PJD_ERR_REF_RAD_LARGER_THAN_90); t = sin (t); t = 1 - P->es * t * t; + if (t == 0.) { + return proj_errno_set(P, PJD_ERR_INVALID_ECCENTRICITY); + } if (i==5) /* arithmetic */ P->a *= (1. - P->es + t) / (2 * t * sqrt(t)); else /* geometric */ |
