[SCM] PostGIS branch stable-3.3 updated. 3.3.5-19-g348949387

git at osgeo.org git at osgeo.org
Wed Jan 10 11:50:29 PST 2024


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, stable-3.3 has been updated
       via  348949387866dbac8bdbf259d52a7183297194bf (commit)
      from  c7dfd59c93389168f514ae2d766e37b71cec5387 (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 348949387866dbac8bdbf259d52a7183297194bf
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jan 10 11:50:22 2024 -0800

    Crash on collections with empty members, references #5646

diff --git a/NEWS b/NEWS
index 0f7117150..14f6b63b6 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ Proj 6.1+, and PostgreSQL 15+.
  - #5635, Handle NaN points in ST_Split (Regina Obe)
  - #5648, postgis_raster upgrade fails on PG16 (Ronan Dunklau)
  - Logic error in ST_Covers(geography) (Paul Ramsey)
+ - #5646, Crash on collections with empty members (Paul Ramsey)
 
 
 PostGIS 3.3.5
diff --git a/postgis/lwgeom_functions_analytic.c b/postgis/lwgeom_functions_analytic.c
index 6fa02c296..4e94f636a 100644
--- a/postgis/lwgeom_functions_analytic.c
+++ b/postgis/lwgeom_functions_analytic.c
@@ -947,6 +947,9 @@ int point_in_multipolygon_rtree(RTREE_NODE **root, int polyCount, int *ringCount
 	/* is the point inside any of the sub-polygons? */
 	for ( p = 0; p < polyCount; p++ )
 	{
+		/* Skip empty polygons */
+		if( ringCounts[p] == 0 ) continue;
+
 		in_ring = point_in_ring_rtree(root[i], &pt);
 		POSTGIS_DEBUGF(4, "point_in_multipolygon_rtree: exterior ring (%d), point_in_ring returned %d", p, in_ring);
 		if ( in_ring == -1 ) /* outside the exterior ring */

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

Summary of changes:
 NEWS                                | 1 +
 postgis/lwgeom_functions_analytic.c | 3 +++
 2 files changed, 4 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list