From 685ad56156f320760c92f7f71fa4acbf3e00acc9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 10 Apr 2019 23:55:52 +0200 Subject: lsat: avoid division by zero in inverse Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14135 Credit to OSS Fuzz --- test/gie/builtins.gie | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 5cbe6325..adaa98d9 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -2902,7 +2902,7 @@ Space oblique for LANDSAT =============================================================================== ------------------------------------------------------------------------------- -operation +proj=lsat +ellps=GRS80 +lat_1=0.5 +lat_2=2 +lsat=1 +path=2 +operation +proj=lsat +ellps=GRS80 +lsat=1 +path=2 ------------------------------------------------------------------------------- tolerance 0.1 mm accept 2 1 @@ -2924,6 +2924,12 @@ expect 126.000734469 -0.001880155 accept -200 -100 expect 126.002524373 -0.001723782 +------------------------------------------------------------------------------- +operation +proj=lsat +path=1 +lsat=5 +ellps=sphere +------------------------------------------------------------------------------- +direction inverse +accept 0 1e10 +expect failure errno invalid_x_or_y =============================================================================== McBryde-Thomas Flat-Polar Sine (No. 1) -- cgit v1.2.3 From 00dffd7ace356d7cb39e2c515237d4351f5b5666 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Apr 2019 00:14:26 +0200 Subject: omerc: avoid division by zero when |lat_0|=90 Partially revert e3346bb39c860883ed9a8ada0657139118e21ef0 (#195) Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14136 Credit to OSS Fuzz --- test/gie/builtins.gie | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index adaa98d9..bbaca7ba 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -3962,6 +3962,11 @@ tolerance 1 mm accept 2 1 expect -3569.825230822232 -5093592.310871849768 +------------------------------------------------------------------------------- +operation +proj=omerc +R=1 +alpha=0 +lat_0=90 +------------------------------------------------------------------------------- +expect failure errno lat_0_or_alpha_eq_90 + =============================================================================== Ortelius Oval -- cgit v1.2.3 From c1e730312965831e6b9c2093677a67716c198622 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Apr 2019 00:21:24 +0200 Subject: omerc: avoid division by zero Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14138 Credit to OSS Fuzz --- test/gie/builtins.gie | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index bbaca7ba..63766e79 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -3967,6 +3967,11 @@ operation +proj=omerc +R=1 +alpha=0 +lat_0=90 ------------------------------------------------------------------------------- expect failure errno lat_0_or_alpha_eq_90 +------------------------------------------------------------------------------- +operation +proj=omerc +lat_1=0.1 +a=6400000 +b=1 +------------------------------------------------------------------------------- +expect failure errno invalid_eccentricity + =============================================================================== Ortelius Oval -- cgit v1.2.3