diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-13 00:38:18 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-12-13 00:38:18 +0100 |
| commit | c86bd69147a289ead837e5400776393bd9072a82 (patch) | |
| tree | 45487e2f5dbb2d0d2272b9a9ab3236c6aa20fca4 /test | |
| parent | 5b4e60f4f9ec353f79fba01790a3b945c50cab8e (diff) | |
| download | PROJ-c86bd69147a289ead837e5400776393bd9072a82.tar.gz PROJ-c86bd69147a289ead837e5400776393bd9072a82.zip | |
WKTParser: fix assertion that can trigger on corrupted input. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19367
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/test_io.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 38dfc2b4..9fefaf9b 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -5577,6 +5577,17 @@ TEST(wkt_parse, invalid_GEOCCS) { "NORTH],AXIS[\"longitude\",EAST]]"), ParsingException); + // ellipsoidal CS is invalid in a GEOCCS + EXPECT_THROW(WKTParser().createFromWKT( + "GEOCCS[\"WGS 84\",DATUM[\"World Geodetic System 1984\"," + "ELLIPSOID[\"WGS 84\",6378274,298.257223564," + "LENGTHUNIT[\"metre\",1]]]," + "CS[ellipsoidal,2],AXIS[\"geodetic latitude (Lat)\",north," + "ANGLEUNIT[\"degree\",0.0174532925199433]]," + "AXIS[\"geodetic longitude (Lon)\",east," + "ANGLEUNIT[\"degree\",0.0174532925199433]]]"), + ParsingException); + // 3 axis required EXPECT_THROW(WKTParser().createFromWKT( "GEOCCS[\"x\",DATUM[\"x\",SPHEROID[\"x\",1,0.5]],PRIMEM[" |
