From caa512b5b135fcf00a01695a5860009671316eb2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 19 Oct 2019 22:59:55 +0200 Subject: createFromPROJString(): do not loop forever on malformed string. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17923. master only --- test/unit/test_io.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/unit') diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 52608a4a..3484d3c2 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -8805,6 +8805,10 @@ TEST(io, projparse_longlat_errors) { "+proj=pipeline +step +proj=longlat +ellps=GRS80 +step " "+proj=axisswap +order=0,0"), ParsingException); + + // We just want to check that we don't loop forever + PROJStringParser().createFromPROJString( + "+=x;proj=pipeline step proj=push +type=crs"); } // --------------------------------------------------------------------------- -- cgit v1.2.3