aboutsummaryrefslogtreecommitdiff
path: root/src/ell_set.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-03-17 08:10:20 +0100
committerGitHub <noreply@github.com>2019-03-17 08:10:20 +0100
commitbf609ea9ae605d3cf3ce76307f92712b75f01e47 (patch)
treef03df01ad362004340826a19c5d28d3b317792b7 /src/ell_set.cpp
parenteab22791b80615e3ad77040423f70205cd7a061d (diff)
parentc6f41f0176d744de5de1ca48e764148ed18e6489 (diff)
downloadPROJ-bf609ea9ae605d3cf3ce76307f92712b75f01e47.tar.gz
PROJ-bf609ea9ae605d3cf3ce76307f92712b75f01e47.zip
Merge pull request #1322 from rouault/ossfuzz_fixes
Various ossfuzz fixes
Diffstat (limited to 'src/ell_set.cpp')
-rw-r--r--src/ell_set.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ell_set.cpp b/src/ell_set.cpp
index 71746895..386b4f46 100644
--- a/src/ell_set.cpp
+++ b/src/ell_set.cpp
@@ -399,6 +399,10 @@ static int ellps_spherification (PJ *P) {
break;
}
+ if (P->a <= 0.) {
+ return proj_errno_set(P, PJD_ERR_MAJOR_AXIS_NOT_GIVEN);
+ }
+
/* Clean up the ellipsoidal parameters to reflect the sphere */
P->es = P->e = P->f = 0;
P->rf = HUGE_VAL;