diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-11-11 22:31:24 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-11-11 22:31:24 +0100 |
| commit | fd1700e493b7caf2d028d35c86e54935b5f255dc (patch) | |
| tree | a9297c3ed89a2fc8d5019a3134aa4b50ee6b3a54 /src | |
| parent | d53581ab6840713e4cb24c6f735cf04e9ce0b2db (diff) | |
| download | PROJ-fd1700e493b7caf2d028d35c86e54935b5f255dc.tar.gz PROJ-fd1700e493b7caf2d028d35c86e54935b5f255dc.zip | |
PJ_ob_tran: avoid null pointer dereference when underling fwd method is NULL. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3645. Credit to OSS Fuzz
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_ob_tran.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index 4f064809..61724202 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -228,10 +228,10 @@ PJ *PROJECTION(ob_tran) { if (fabs(phip) > TOL) { /* oblique */ Q->cphip = cos(phip); Q->sphip = sin(phip); - P->fwd = o_forward; + P->fwd = Q->link->fwd ? o_forward : 0; P->inv = Q->link->inv ? o_inverse : 0; } else { /* transverse */ - P->fwd = t_forward; + P->fwd = Q->link->fwd ? t_forward : 0; P->inv = Q->link->inv ? t_inverse : 0; } |
