From c5b617aadf9dfc036856303d1882cfaa98b00825 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 30 May 2017 14:26:10 +0200 Subject: 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 --- src/PJ_ob_tran.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit v1.2.3