From 3767adabe2aadcaa053a11e4f8c2993486242d32 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 10 Feb 2020 16:19:53 +0100 Subject: 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 --- src/iso19111/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 = -- cgit v1.2.3