aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-03-14 23:07:29 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-03-14 23:07:29 +0100
commitfde6150b61aa225bb960d46f1611c82bf81315b3 (patch)
treeb7c2741163c58245a60242900111f59028667ae3 /src/init.cpp
parent5dc01e985e86b441ba2a671b712d3b211c8a2b33 (diff)
downloadPROJ-fde6150b61aa225bb960d46f1611c82bf81315b3.tar.gz
PROJ-fde6150b61aa225bb960d46f1611c82bf81315b3.zip
Reject eccentricity values larger than one
Valid eccentricity should be between 0 (included) or 1 (excluded) Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13665 Credit to OSS Fuzz
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2961bcca..13ea4ae8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -680,7 +680,7 @@ pj_init_ctx_with_allow_init_epsg(projCtx ctx, int argc, char **argv, int allow_i
PIN->a_orig = PIN->a;
PIN->es_orig = PIN->es;
if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es))
- return pj_default_destructor (PIN, PJD_ERR_ECCENTRICITY_IS_ONE);
+ return pj_default_destructor (PIN, PJD_ERR_ECCENTRICITY_IS_ONE_OR_GREATER);
/* Now that we have ellipse information check for WGS84 datum */
if( PIN->datum_type == PJD_3PARAM