[SCM] PostGIS branch master updated. 3.7.0rc1-96-g6c64af35b
git at osgeo.org
git at osgeo.org
Wed Oct 7 07:25:47 PDT 2026
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 6c64af35bd63276d7e90968830416062cd2cbe42 (commit)
from 33904db915bb3c2ff0f23a69f047bfdb5b93fcc0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6c64af35bd63276d7e90968830416062cd2cbe42
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Oct 7 16:25:34 2026 +0200
Add more return code checks
diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index d683673a7..91efe0a20 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -61,26 +61,40 @@ _lwt_describe_point(const LWPOINT *pt, char *buf, size_t bufsize)
static int
_lwt_describe_intersection_point(const LWGEOM *g1, const LWGEOM *g2, char *buf, size_t bufsize)
{
- const POINT2D *p;
- LWGEOM *isect;
- LWGEOM *normalized;
- LWGEOM *surface_pt;
+ const POINT2D *p;
+ LWGEOM *isect;
+ LWGEOM *normalized;
+ LWGEOM *surface_pt;
- isect = lwgeom_intersection(g1, g2);
- if (!isect) return 0;
+ isect = lwgeom_intersection(g1, g2);
+ if (!isect) return 0;
- normalized = lwgeom_clone_deep(isect);
- lwgeom_free(isect);
- lwgeom_normalize(normalized);
+ normalized = lwgeom_clone_deep(isect);
+ lwgeom_free(isect);
+ if ( ! normalized ) {
+ return 0;
+ }
+ lwgeom_normalize(normalized);
- surface_pt = lwgeom_pointonsurface(normalized);
- lwgeom_free(normalized);
- p = getPoint2d_cp(lwgeom_as_lwpoint(surface_pt)->point, 0);
+ surface_pt = lwgeom_pointonsurface(normalized);
+ lwgeom_free(normalized);
+ if ( ! surface_pt ) {
+ return 0;
+ }
- snprintf(buf, bufsize, "POINT(%.15g %.15g)", p->x, p->y);
- lwgeom_free(surface_pt);
+ if ( ! lwgeom_as_lwpoint(surface_pt) ) {
+ return 0;
+ }
+ p = getPoint2d_cp(lwgeom_as_lwpoint(surface_pt)->point, 0);
+ if ( ! p ) {
+ lwgeom_free(surface_pt);
+ return 0;
+ }
- return 1;
+ snprintf(buf, bufsize, "POINT(%.15g %.15g)", p->x, p->y);
+ lwgeom_free(surface_pt);
+
+ return 1;
}
/*********************************************************************
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/topo/lwgeom_topo.c | 44 +++++++++++++++++++++++++++++---------------
1 file changed, 29 insertions(+), 15 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list