diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-04-12 18:21:22 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-04-12 18:21:22 +0200 |
| commit | 33f81359efd93ccd4bf59cc4f6b68c6363042f97 (patch) | |
| tree | 45821c19e95199e58a70f52a1b2bfe4699b3992f /src/init.cpp | |
| parent | 2117c151d62cd0267068075b9e7cf7cc0d404a63 (diff) | |
| download | PROJ-33f81359efd93ccd4bf59cc4f6b68c6363042f97.tar.gz PROJ-33f81359efd93ccd4bf59cc4f6b68c6363042f97.zip | |
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
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |
