diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-10 16:19:53 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-02-10 16:19:53 +0100 |
| commit | 3767adabe2aadcaa053a11e4f8c2993486242d32 (patch) | |
| tree | 6330f23a9b466d4d4ec172dcef2b5147077697f4 /src/iso19111/io.cpp | |
| parent | 188dcf2cb98efda40c97372c110aa6d46c57f9fb (diff) | |
| download | PROJ-3767adabe2aadcaa053a11e4f8c2993486242d32.tar.gz PROJ-3767adabe2aadcaa053a11e4f8c2993486242d32.zip | |
PROJStringParser::Private::buildProjectedCRS(): avoid (harmless) division by zero in super odd case with corrupted PROJ string. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20624
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index b2358eb1..8a8ad526 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -8783,7 +8783,7 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS( if (k >= 0 && k <= 1) { const double es = geogCRS->ellipsoid()->squaredEccentricity(); - if (es < 0) { + if (es < 0 || es == 1) { throw ParsingException("Invalid flattening"); } value = |
