diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-07 17:50:29 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-07 17:50:29 +0200 |
| commit | 312e511cded7e29d23c5ff5ebf5f1be0bcdc44bb (patch) | |
| tree | 8d50bc7b6ddb5b2039997e0c62265299a9f2c28f /src/iso19111 | |
| parent | e75eebac667ef68222ba4ae697118761f667b57f (diff) | |
| download | PROJ-312e511cded7e29d23c5ff5ebf5f1be0bcdc44bb.tar.gz PROJ-312e511cded7e29d23c5ff5ebf5f1be0bcdc44bb.zip | |
pj_obj_create(): avoid passing invalid ellipsoid parameters to geod_init(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38192
Diffstat (limited to 'src/iso19111')
| -rw-r--r-- | src/iso19111/c_api.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index b27ac005..791d75bc 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -222,7 +222,7 @@ static PJ *pj_obj_create(PJ_CONTEXT *ctx, const IdentifiedObjectNNPtr &objIn) { const auto &ellps = geodCRS->ellipsoid(); const double a = ellps->semiMajorAxis().getSIValue(); const double es = ellps->squaredEccentricity(); - if (!(a > 0 && es >= 0)) { + if (!(a > 0 && es >= 0 && es < 1)) { proj_log_error(pj, _("Invalid ellipsoid parameters")); proj_errno_set(pj, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); |
