diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-03-25 23:45:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-25 23:45:52 +0200 |
| commit | 970bad5516f5cca4c097e3fa34fe38ad77493b66 (patch) | |
| tree | aeb41b1f9adc807ebfa9d24461b0d5a21130ecaf /src | |
| parent | 325726a2b60743963fe4d392061dc81da1fc01e3 (diff) | |
| parent | e52ab929670eaa65cc6c0284f24d3c0fa53f6bcc (diff) | |
| download | PROJ-970bad5516f5cca4c097e3fa34fe38ad77493b66.tar.gz PROJ-970bad5516f5cca4c097e3fa34fe38ad77493b66.zip | |
Merge pull request #899 from schwehr/proj_etmerc-inf-zone-b76304619
Catch over range lam0 in proj_etmerc.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/proj_etmerc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/proj_etmerc.c b/src/proj_etmerc.c index ffb10930..99646d14 100644 --- a/src/proj_etmerc.c +++ b/src/proj_etmerc.c @@ -345,6 +345,10 @@ PJ *PROJECTION(utm) { proj_errno_set(P, PJD_ERR_ELLIPSOID_USE_REQUIRED); return pj_default_destructor(P, ENOMEM); } + if (P->lam0 < -1000.0 || P->lam0 > 1000.0) { + return pj_default_destructor(P, PJD_ERR_INVALID_UTM_ZONE); + } + P->y0 = pj_param (P->ctx, P->params, "bsouth").i ? 10000000. : 0.; P->x0 = 500000.; if (pj_param (P->ctx, P->params, "tzone").i) /* zone input ? */ |
