diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-03-25 08:34:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-25 08:34:16 +0100 |
| commit | 56784e70f3903cd1a0a7a3d47dfef7f837400d28 (patch) | |
| tree | be1b9edddd34449a542d4da15c1a4c021d95a849 /src/projections/tmerc.cpp | |
| parent | e1e0cfdf88b17b1e9fc5e9f81e0619a4cf1a511b (diff) | |
| parent | 2e60df106deba4455089143e5ae0a4ea1858a3e1 (diff) | |
| download | PROJ-56784e70f3903cd1a0a7a3d47dfef7f837400d28.tar.gz PROJ-56784e70f3903cd1a0a7a3d47dfef7f837400d28.zip | |
Merge pull request #1359 from rouault/fix_ossfuzz_13892_and_others
Fix ossfuzz 13892, 13893, 13894, 13895
Diffstat (limited to 'src/projections/tmerc.cpp')
| -rw-r--r-- | src/projections/tmerc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/projections/tmerc.cpp b/src/projections/tmerc.cpp index c91c5174..bb56f8ae 100644 --- a/src/projections/tmerc.cpp +++ b/src/projections/tmerc.cpp @@ -188,6 +188,10 @@ static PJ_LP approx_s_inv (PJ_XY xy, PJ *P) { double h, g; h = exp(xy.x / static_cast<struct pj_opaque_approx*>(P->opaque)->esp); + if( h == 0 ) { + proj_errno_set(P, PJD_ERR_INVALID_X_OR_Y); + return proj_coord_error().lp; + } g = .5 * (h - 1. / h); h = cos (P->phi0 + xy.y / static_cast<struct pj_opaque_approx*>(P->opaque)->esp); lp.phi = asin(sqrt((1. - h * h) / (1. + g * g))); |
