aboutsummaryrefslogtreecommitdiff
path: root/src/proj_4D_api.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-08-24 22:54:33 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-08-24 22:54:33 +0200
commit3d6de19a4b1a68156d16c4861a6c3c1ef8a81b45 (patch)
tree26b97ee260ecc3f6936c469065197fce56dda7e3 /src/proj_4D_api.c
parentee57ac53103e0e0b7edde6f99e835a5c2140df96 (diff)
downloadPROJ-3d6de19a4b1a68156d16c4861a6c3c1ef8a81b45.tar.gz
PROJ-3d6de19a4b1a68156d16c4861a6c3c1ef8a81b45.zip
proj_4D_api.c: fix potential null pointer dereference. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10033. Credit to OSS Fuzz. master only
Diffstat (limited to 'src/proj_4D_api.c')
-rw-r--r--src/proj_4D_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c
index f0543893..74cf45d6 100644
--- a/src/proj_4D_api.c
+++ b/src/proj_4D_api.c
@@ -505,10 +505,10 @@ Returns 1 on success, 0 on failure
return 0;
sprintf (def, "break_cs2cs_recursion proj=helmert exact %s convention=position_vector", s);
Q = proj_create (P->ctx, def);
- pj_inherit_ellipsoid_def (P, Q);
- free (def);
+ free(def);
if (0==Q)
return 0;
+ pj_inherit_ellipsoid_def (P, Q);
P->helmert = skip_prep_fin (Q);
break;