From fde6150b61aa225bb960d46f1611c82bf81315b3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 14 Mar 2019 23:07:29 +0100 Subject: 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 --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init.cpp') 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 -- cgit v1.2.3