aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-04 22:36:00 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-04 22:36:00 +0200
commit70ed3efe60718be74d73d92ec2d121e2de268e53 (patch)
tree2a16573f690d8f7e07df4dbbc0ab5fabd376723c /src/init.cpp
parent1e2e512f9a671df504f6f01eee53dc26939b3c0a (diff)
downloadPROJ-70ed3efe60718be74d73d92ec2d121e2de268e53.tar.gz
PROJ-70ed3efe60718be74d73d92ec2d121e2de268e53.zip
Reject negative e parameter to avoid division by zero
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14044 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 cfcba96f..0fd303f5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -679,7 +679,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_OR_GREATER);
+ return pj_default_destructor (PIN, PJD_ERR_INVALID_ECCENTRICITY);
/* Now that we have ellipse information check for WGS84 datum */
if( PIN->datum_type == PJD_3PARAM