diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-04-05 12:54:56 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-04-05 12:54:56 +0200 |
| commit | 3aed84243a8188b54d19d7e9c26028796eb398b0 (patch) | |
| tree | dda3a21057e3f823c56d0247b5241428518c406f /test/unit/test_operation.cpp | |
| parent | 70ed3efe60718be74d73d92ec2d121e2de268e53 (diff) | |
| download | PROJ-3aed84243a8188b54d19d7e9c26028796eb398b0.tar.gz PROJ-3aed84243a8188b54d19d7e9c26028796eb398b0.zip | |
_buildUnit(): avoid later division by zero
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14055
Credit to OSS Fuzz
Diffstat (limited to 'test/unit/test_operation.cpp')
| -rw-r--r-- | test/unit/test_operation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index c4cafef6..08a3f6ad 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -4504,7 +4504,8 @@ TEST(operation, geogCRS_to_geogCRS_noop) { GeographicCRS::EPSG_4326, GeographicCRS::EPSG_4326); ASSERT_TRUE(op != nullptr); EXPECT_EQ(op->nameStr(), "Null geographic offset from WGS 84 to WGS 84"); - EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), "+proj=noop"); + EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=noop"); EXPECT_EQ(op->inverse()->nameStr(), op->nameStr()); } @@ -4845,7 +4846,8 @@ TEST(operation, geocentricCRS_to_geocentricCRS_noop) { ASSERT_TRUE(op != nullptr); EXPECT_EQ(op->nameStr(), "Ballpark geocentric translation from WGS 84 to WGS 84"); - EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), "+proj=noop"); + EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=noop"); EXPECT_EQ(op->inverse()->nameStr(), op->nameStr()); } |
