aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-02-02 09:44:44 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-02-02 09:44:44 +0100
commit1c60f4cc408e85aff78482659a80fe974ee5d57b (patch)
tree073ce0071c0177cc9bf1435bef4b6c4c94b0c7ae /test
parent17a26919fe7070ea8c0ee134d99e43587a0df9d0 (diff)
downloadPROJ-1c60f4cc408e85aff78482659a80fe974ee5d57b.tar.gz
PROJ-1c60f4cc408e85aff78482659a80fe974ee5d57b.zip
PROJStringSyntaxParser: avoid assertion on illegal input. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12837. Credit to OSS Fuzz
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_io.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 1bbedc03..157614b4 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -8735,6 +8735,10 @@ TEST(io, projparse_errors) {
EXPECT_THROW(PROJStringParser().createFromPROJString(
"proj=pipeline step init=epsg:4326 init=epsg:4326"),
ParsingException);
+
+ EXPECT_THROW(
+ PROJStringParser().createFromPROJString("proj=\tinit= +type=crs"),
+ ParsingException);
}
// ---------------------------------------------------------------------------