[SCM] PostGIS branch master updated. 3.6.0rc2-718-g02f843698

git at osgeo.org git at osgeo.org
Thu Jul 2 21:47:24 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  02f84369857b2ce0d9d4036d79f7ac28be285619 (commit)
       via  9d91cff7bda1409902b47ec825303f1a9a238e66 (commit)
       via  0adb0647f56b7580bccaff7057acd775ca8ee616 (commit)
      from  1cc22bee30384622c4fa3601408d5e56ef03126a (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 02f84369857b2ce0d9d4036d79f7ac28be285619
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Jun 26 07:31:39 2026 +0200

    refactor: rename lwgeom_nurbs.c to lwnurbscurve.c

diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in
index d053cddc0..00bb96470 100644
--- a/liblwgeom/Makefile.in
+++ b/liblwgeom/Makefile.in
@@ -122,7 +122,7 @@ SA_OBJS = \
 	lwgeom_geos_cluster.o \
 	lwgeom_geos_node.o \
 	lwgeom_geos_split.o \
-	lwgeom_nurbs.o \
+	lwnurbscurve.o \
 	topo/lwgeom_topo.o \
 	topo/lwgeom_topo_polygonizer.o \
 	topo/lwt_edgeend.o \
diff --git a/liblwgeom/lwgeom_nurbs.c b/liblwgeom/lwnurbscurve.c
similarity index 100%
rename from liblwgeom/lwgeom_nurbs.c
rename to liblwgeom/lwnurbscurve.c

commit 9d91cff7bda1409902b47ec825303f1a9a238e66
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Jun 26 07:30:30 2026 +0200

    fix: free points/bbox on construct failure in NURBS clone/force_dims

diff --git a/liblwgeom/lwgeom_nurbs.c b/liblwgeom/lwgeom_nurbs.c
index a55bd4197..7af0d2cb9 100644
--- a/liblwgeom/lwgeom_nurbs.c
+++ b/liblwgeom/lwgeom_nurbs.c
@@ -237,9 +237,15 @@ lwnurbscurve_clone_deep(const LWNURBSCURVE *curve)
 	GBOX *bbox = curve->bbox ? gbox_copy(curve->bbox) : NULL;
 
 	/* lwnurbscurve_construct will deep-copy weights and knots arrays */
-	return lwnurbscurve_construct(curve->srid, bbox, curve->degree, points,
+	LWNURBSCURVE *result = lwnurbscurve_construct(curve->srid, bbox, curve->degree, points,
 	                             curve->weights, curve->knots,
 	                             curve->nweights, curve->nknots);
+	if (!result)
+	{
+		ptarray_free(points);
+		if (bbox) lwfree(bbox);
+	}
+	return result;
 }
 
 LWNURBSCURVE *
@@ -255,9 +261,14 @@ lwnurbscurve_force_dims(const LWNURBSCURVE *curve, int hasz, int hasm, double zv
 
 	points = ptarray_force_dims(curve->points, hasz, hasm, zval, mval);
 
-	return lwnurbscurve_construct(curve->srid, NULL, curve->degree, points,
+	LWNURBSCURVE *result = lwnurbscurve_construct(curve->srid, NULL, curve->degree, points,
 	                              curve->weights, curve->knots,
 	                              curve->nweights, curve->nknots);
+	if (!result)
+	{
+		ptarray_free(points);
+	}
+	return result;
 }
 
 /**

commit 0adb0647f56b7580bccaff7057acd775ca8ee616
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Jun 26 07:08:54 2026 +0200

    fix: guard ST_MakeNurbsCurve optional args

diff --git a/postgis/lwgeom_nurbs_functions.c b/postgis/lwgeom_nurbs_functions.c
index 62c90125f..aa0e5f333 100644
--- a/postgis/lwgeom_nurbs_functions.c
+++ b/postgis/lwgeom_nurbs_functions.c
@@ -179,10 +179,10 @@ Datum ST_MakeNurbsCurve(PG_FUNCTION_ARGS)
 	pcontrol_pts = PG_GETARG_GSERIALIZED_P(1);
 
 	/* Optional parameters */
-	if (!PG_ARGISNULL(2)) {
+	if (PG_NARGS() > 2 && !PG_ARGISNULL(2)) {
 		weights_array = PG_GETARG_ARRAYTYPE_P(2);
 	}
-	if (!PG_ARGISNULL(3)) {
+	if (PG_NARGS() > 3 && !PG_ARGISNULL(3)) {
 		knots_array = PG_GETARG_ARRAYTYPE_P(3);
 	}
 

-----------------------------------------------------------------------

Summary of changes:
 liblwgeom/Makefile.in                        |  2 +-
 liblwgeom/{lwgeom_nurbs.c => lwnurbscurve.c} | 15 +++++++++++++--
 postgis/lwgeom_nurbs_functions.c             |  4 ++--
 3 files changed, 16 insertions(+), 5 deletions(-)
 rename liblwgeom/{lwgeom_nurbs.c => lwnurbscurve.c} (98%)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list