diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-03-15 20:04:15 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2019-03-17 08:10:57 +0100 |
| commit | d6c8e820ec85b9474cd1e1fe166a7ccb752843be (patch) | |
| tree | 96878386120376cb81921caa8f80fedac4170d36 /src/projections/aea.cpp | |
| parent | 5d86735f6770fc7779578205f6f5ecbf91536035 (diff) | |
| download | PROJ-d6c8e820ec85b9474cd1e1fe166a7ccb752843be.tar.gz PROJ-d6c8e820ec85b9474cd1e1fe166a7ccb752843be.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); |
