diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-02 11:25:36 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-02 11:25:36 +0100 |
| commit | abad23412f0920276c32567c8f237be23aa94941 (patch) | |
| tree | 70c146b20d2f66dd9f2cf6641cb4228194a9fcdb /src/ell_set.cpp | |
| parent | 3ed6153400299db04163ffe8fd9fd785eb9ca12e (diff) | |
| download | PROJ-abad23412f0920276c32567c8f237be23aa94941.tar.gz PROJ-abad23412f0920276c32567c8f237be23aa94941.zip | |
pj_ellipsoid(): avoid division by zero when R=0. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12843. Credit to OSS Fuzz
Diffstat (limited to 'src/ell_set.cpp')
| -rw-r--r-- | src/ell_set.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ell_set.cpp b/src/ell_set.cpp index f4228be8..4c9fc892 100644 --- a/src/ell_set.cpp +++ b/src/ell_set.cpp @@ -88,7 +88,8 @@ int pj_ellipsoid (PJ *P) { /* Specifying R overrules everything */ if (pj_get_param (P->params, "R")) { - ellps_size (P); + if (0 != ellps_size (P)) + return 1; pj_calc_ellipsoid_params (P, P->a, 0); if (proj_errno (P)) return 1; |
