diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-03 16:07:10 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-03 16:07:10 +0100 |
| commit | 4abfe10ab7a64552db242aa240bbcf2f92598604 (patch) | |
| tree | 670f38370dae8af534aee200460a2ddf72c97839 /test | |
| parent | e121dc35abafd9a2eda01b05aa5fa13b13e6196e (diff) | |
| download | PROJ-4abfe10ab7a64552db242aa240bbcf2f92598604.tar.gz PROJ-4abfe10ab7a64552db242aa240bbcf2f92598604.zip | |
init(): repair to_meter=num/denom that was broken in the general case in PROJ 5; repair vto_meter=num/denom that was broken, and avoid division by zero, which fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12869. Credit to OSS Fuzz
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/4D-API_cs2cs-style.gie | 8 | ||||
| -rw-r--r-- | test/gie/more_builtins.gie | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index f66b26ec..215971a0 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -348,6 +348,14 @@ accept 0 0 1000 expect 0 0 1 roundtrip 1 +operation +proj=longlat +a=1 +b=1 +vto_meter=2000/2 +accept 0 0 1000 +expect 0 0 1 +roundtrip 1 + +operation +proj=longlat +a=1 +b=1 +vto_meter=1/0 +expect failure errno unit_factor_less_than_0 + operation +proj=longlat +a=1 +b=1 +vto_meter=1000 +geoc accept 0 0 1000 expect 0 0 1 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 44d01385..d1c978a3 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -496,6 +496,14 @@ expect failure errno unit_factor_less_than_0 operation proj=utm ellps=GRS80 zone=32 to_meter=10 accept 12 55 expect 69187.5632 609890.7825 + +operation proj=utm ellps=GRS80 zone=32 to_meter=1/0 +expect failure errno unit_factor_less_than_0 + +operation proj=utm ellps=GRS80 zone=32 to_meter=2.0/0.2 +accept 12 55 +expect 69187.5632 609890.7825 + ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- |
