diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-03-15 20:04:15 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-03-16 10:10:02 +0100 |
| commit | 7dd1a2ee6bfb33807594f115c59548f8cf1d3475 (patch) | |
| tree | b7abd955a652d7ebf34a879195347d195e529feb /src/projections/aea.cpp | |
| parent | 3cce54767afe77412b850d2d88ee168370570b6f (diff) | |
| download | PROJ-7dd1a2ee6bfb33807594f115c59548f8cf1d3475.tar.gz PROJ-7dd1a2ee6bfb33807594f115c59548f8cf1d3475.zip | |
aea: validate |lat_1| and |lat_2| <= 90
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13028
Credit to OSS Fuzz
Diffstat (limited to 'src/projections/aea.cpp')
| -rw-r--r-- | src/projections/aea.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/projections/aea.cpp b/src/projections/aea.cpp index 9a0c4656..f457e836 100644 --- a/src/projections/aea.cpp +++ b/src/projections/aea.cpp @@ -155,6 +155,8 @@ static PJ *setup(PJ *P) { P->inv = e_inverse; P->fwd = e_forward; + if (fabs(Q->phi1) > M_HALFPI || fabs(Q->phi2) > M_HALFPI) + return destructor(P, PJD_ERR_LAT_LARGER_THAN_90); if (fabs(Q->phi1 + Q->phi2) < EPS10) return destructor(P, PJD_ERR_CONIC_LAT_EQUAL); Q->n = sinphi = sin(Q->phi1); |
