From fde6150b61aa225bb960d46f1611c82bf81315b3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 14 Mar 2019 23:07:29 +0100 Subject: Reject eccentricity values larger than one Valid eccentricity should be between 0 (included) or 1 (excluded) Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13665 Credit to OSS Fuzz --- src/strerrno.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 01097a42..5dedef98 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -14,7 +14,7 @@ pj_err_list[] = { "no colon in init= string", /* -3 */ "projection not named", /* -4 */ "unknown projection id", /* -5 */ - "effective eccentricity = 1.", /* -6 */ + "effective eccentricity >= 1.", /* -6 */ "unknown unit conversion id", /* -7 */ "invalid boolean param argument", /* -8 */ "unknown elliptical parameter name", /* -9 */ -- cgit v1.2.3 From 7dd1a2ee6bfb33807594f115c59548f8cf1d3475 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 15 Mar 2019 20:04:15 +0100 Subject: aea: validate |lat_1| and |lat_2| <= 90 Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13028 Credit to OSS Fuzz --- src/strerrno.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 5dedef98..a9310a55 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -30,7 +30,7 @@ pj_err_list[] = { "acos/asin: |arg| >1.+1e-14", /* -19 */ "tolerance condition error", /* -20 */ "conic lat_1 = -lat_2", /* -21 */ - "lat_1 >= 90", /* -22 */ + "lat_0, lat_1 or lat_2 >= 90", /* -22 */ "lat_1 = 0", /* -23 */ "lat_ts >= 90", /* -24 */ "no distance between control points", /* -25 */ -- cgit v1.2.3 From c64972d10d44ea21b41a67ab581ac439d1a7f63b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Mar 2019 16:06:06 +0100 Subject: strerrno.cpp: fix inverted messages for PJD_ERR_LAT_1_OR_2_ZERO_OR_90 and PJD_ERR_LAT_0_OR_ALPHA_EQ_90 --- src/strerrno.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index a9310a55..20255747 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -40,8 +40,8 @@ pj_err_list[] = { "path not in range", /* -29 */ "h <= 0", /* -30 */ "k <= 0", /* -31 */ - "lat_0 = 0 or 90 or alpha = 90", /* -32 */ - "lat_1=lat_2 or lat_1=0 or lat_2=90", /* -33 */ + "lat_1=lat_2 or lat_1=0 or lat_2=90", /* -32 */ + "lat_0 = 0 or 90 or alpha = 90", /* -33 */ "elliptical usage required", /* -34 */ "invalid UTM zone number", /* -35 */ "", /* no longer used */ /* -36 */ -- cgit v1.2.3 From b4bbcc3f264602bb4b58a5c703cc220ed404d127 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Mon, 25 Mar 2019 18:12:03 +0000 Subject: pj_strerrno: enable system error messages HAVE_STRERROR is defined in proj_config.h. --- src/strerrno.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 20255747..af130fc4 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -5,6 +5,7 @@ #include #include "proj.h" +#include "proj_config.h" #include "proj_internal.h" static const char * const -- cgit v1.2.3 From 20300c1fd5b35bf1d577a3726f02940d02c73f54 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 2 Apr 2019 13:30:33 +0200 Subject: Make sure that ISO19111 C++ code sets pj_errno on errors --- src/strerrno.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index af130fc4..4020cb23 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -70,6 +70,7 @@ pj_err_list[] = { "argument not numerical or out of range", /* -58 */ "inconsistent unit type between input and output", /* -59 */ "arguments are mutually exclusive", /* -60 */ + "generic error of unknow origin", /* -61 */ /* When adding error messages, remember to update ID defines in projects.h, and transient_error array in pj_transform */ -- cgit v1.2.3 From 70ed3efe60718be74d73d92ec2d121e2de268e53 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 4 Apr 2019 22:36:00 +0200 Subject: Reject negative e parameter to avoid division by zero Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14044 Credit to OSS Fuzz --- src/strerrno.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 4020cb23..c230d226 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -15,7 +15,7 @@ pj_err_list[] = { "no colon in init= string", /* -3 */ "projection not named", /* -4 */ "unknown projection id", /* -5 */ - "effective eccentricity >= 1.", /* -6 */ + "effective eccentricity < 0 or >= 1.", /* -6 */ "unknown unit conversion id", /* -7 */ "invalid boolean param argument", /* -8 */ "unknown elliptical parameter name", /* -9 */ -- cgit v1.2.3 From 96af6dbf69dd38421916438702be80f73276d879 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 5 May 2019 20:28:59 +0200 Subject: geos: avoid division by zero Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14602 Credit to OSS Fuzz --- src/strerrno.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index c230d226..12546bd0 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -39,7 +39,7 @@ pj_err_list[] = { "W <= 0 or M <= 0", /* -27 */ "lsat not in 1-5 range", /* -28 */ "path not in range", /* -29 */ - "h <= 0", /* -30 */ + "h <= 0 or h > 1e10 * a", /* -30 */ "k <= 0", /* -31 */ "lat_1=lat_2 or lat_1=0 or lat_2=90", /* -32 */ "lat_0 = 0 or 90 or alpha = 90", /* -33 */ -- cgit v1.2.3 From 19766318ef918db5a4ef90700db10a9c91281d46 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Mon, 6 May 2019 08:54:10 +0200 Subject: Fix spelling errors. * unknow -> unknown --- src/strerrno.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strerrno.cpp') diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 12546bd0..9bf5f45a 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -70,7 +70,7 @@ pj_err_list[] = { "argument not numerical or out of range", /* -58 */ "inconsistent unit type between input and output", /* -59 */ "arguments are mutually exclusive", /* -60 */ - "generic error of unknow origin", /* -61 */ + "generic error of unknown origin", /* -61 */ /* When adding error messages, remember to update ID defines in projects.h, and transient_error array in pj_transform */ -- cgit v1.2.3