[SCM] PostGIS branch stable-3.1 updated. 3.1.10-15-g003c0548e

git at osgeo.org git at osgeo.org
Wed Jan 10 11:51:48 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.1 has been updated
       via  003c0548eca4cacf04b7c270c3f9bb83bfdea3e7 (commit)
      from  e64ae3be8b57e1948210afe5df0c46274dc0c039 (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 003c0548eca4cacf04b7c270c3f9bb83bfdea3e7
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jan 10 11:51:39 2024 -0800

    Crash on collections with empty members, references #5646

diff --git a/NEWS b/NEWS
index e7a56f002..bf408177c 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ xxxx/xx/xx
  - #5604, Handle distance between collections with empty elements (Paul Ramsey)
  - #5635, Handle NaN points in ST_Split (Regina Obe)
  - Logic error in ST_Covers(geography) (Paul Ramsey)
+ - #5646, Crash on collections with empty members (Paul Ramsey)
 
 
 PostGIS 3.1.10
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