From 47db7804524066e74fd787bdd0d7f2ba8394c220 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 14 Apr 2019 20:11:17 +0200 Subject: lcc: avoid division by zero Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14250 Credit to OSS Fuzz --- test/gie/builtins.gie | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 7de5fccc..8e82979e 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -2740,9 +2740,18 @@ expect 1 2 ------------------------------------------------------------------------------- operation +proj=lcc +a=9999999 +b=.9 +lat_2=1 -------------------------------------------------------------------------- +------------------------------------------------------------------------------- expect failure errno invalid_eccentricity +------------------------------------------------------------------------------- +# This case is incredible. ossfuzz has found the exact value of lat_1 that +# triggers a division by zero +operation +proj=lcc +lat_1=2D32 +lat_2=0 +a=6378137 +b=0.2 +------------------------------------------------------------------------------- +expect failure +# For some reason fails on MacOSX with a different error +# errno invalid_eccentricity + ------------------------------------------------------------------------------- operation +proj=lcc +ellps=GRS80 +lat_1=0 +lat_2=90 ------------------------------------------------------------------------------- -- cgit v1.2.3