diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-17 21:41:15 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-17 21:41:15 +0200 |
| commit | 8e76c61082c5c74d1e29d5d850b2cdd09ab35ba8 (patch) | |
| tree | c47d5c4f01aeb33f3193e5ffc59e70536165ad28 /src/transformations | |
| parent | 216cf0c26c7e63084f30d9eea03c4f36ae3afcad (diff) | |
| download | PROJ-8e76c61082c5c74d1e29d5d850b2cdd09ab35ba8.tar.gz PROJ-8e76c61082c5c74d1e29d5d850b2cdd09ab35ba8.zip | |
helmert: validate scale parameter to avoid later division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16106
Diffstat (limited to 'src/transformations')
| -rw-r--r-- | src/transformations/helmert.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/transformations/helmert.cpp b/src/transformations/helmert.cpp index 63785ea5..7a3e64d0 100644 --- a/src/transformations/helmert.cpp +++ b/src/transformations/helmert.cpp @@ -612,6 +612,8 @@ PJ *TRANSFORMATION(helmert, 0) { /* Scale */ if (pj_param (P->ctx, P->params, "ts").i) { Q->scale_0 = pj_param (P->ctx, P->params, "ds").f; + if( Q->scale_0 <= -1.0e6 ) + return pj_default_destructor (P, PJD_ERR_INVALID_SCALE); if (pj_param (P->ctx, P->params, "ttheta").i && Q->scale_0 == 0.0) return pj_default_destructor (P, PJD_ERR_INVALID_SCALE); } |
