From 33f81359efd93ccd4bf59cc4f6b68c6363042f97 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 12 Apr 2019 18:21:22 +0200 Subject: Validate lat_0 range in general case, lat_1 and lat_2 for lcc and eqdc Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14211 Credit to OSS Fuzz --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 0fd303f5..ba9cddd2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -736,6 +736,8 @@ pj_init_ctx_with_allow_init_epsg(projCtx ctx, int argc, char **argv, int allow_i /* Central latitude */ PIN->phi0 = pj_param(ctx, start, "rlat_0").f; + if( fabs(PIN->phi0) > M_HALFPI ) + return pj_default_destructor (PIN, PJD_ERR_LAT_LARGER_THAN_90); /* False easting and northing */ PIN->x0 = pj_param(ctx, start, "dx_0").f; -- cgit v1.2.3