aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-05-30 14:26:10 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-05-30 14:26:10 +0200
commitc5b617aadf9dfc036856303d1882cfaa98b00825 (patch)
tree2de7dd83a5d7cade1b56cceecc1fbff6f404cd82 /src
parenta395e6e244e04dd09284e24eb1ca3ff2a7c9f37f (diff)
downloadPROJ-c5b617aadf9dfc036856303d1882cfaa98b00825.tar.gz
PROJ-c5b617aadf9dfc036856303d1882cfaa98b00825.zip
PJ_ob_tran: fix crash if underlying projection has no fwd method
For example +proj=ob_tran +o_proj=hgridshift Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1927 Credit to OSS Fuzz
Diffstat (limited to 'src')
-rw-r--r--src/PJ_ob_tran.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index afac5136..96752e8d 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -133,6 +133,9 @@ PJ *PROJECTION(ob_tran) {
if (!(Q->link = pj_list[i].proj(Q->link))) {
return freeup_new(P);
}
+ if( Q->link->fwd == 0 ) {
+ return freeup_new(P);
+ }
if (pj_param(P->ctx, P->params, "to_alpha").i) {
double lamc, phic, alpha;