[SCM] PostGIS branch stable-3.1 updated. 3.1.11-38-g4282bb283

git at osgeo.org git at osgeo.org
Fri Jun 6 15:15:44 PDT 2025


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  4282bb2830eb833f2c232cb08ada94273f1c11f4 (commit)
       via  9d4f0a937fae51fb0509dcda5e8dc8b6132956ff (commit)
      from  d77436131d58ad87ad4bc95bc93a3bc0878b2a07 (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 4282bb2830eb833f2c232cb08ada94273f1c11f4
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Jun 6 15:15:40 2025 -0700

    News entry for #5917

diff --git a/NEWS b/NEWS
index a0fb68d4f..98ab01c68 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ YYYY/MM/DD
  - #5912, Crash on GML with xlink and no prefix (Paul Ramsey)
  - #5905, Crash on deeply nested geometries (Paul Ramsey)
  - #5909, ST_ValueCount crashes on empty table (Paul Ramsey)
+ - #5917, ST_Relate becomes unresponsive (Paul Ramsey)
 
 
 PostGIS 3.1.12

commit 9d4f0a937fae51fb0509dcda5e8dc8b6132956ff
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Jun 6 15:10:00 2025 -0700

    ST_Relate becomes unresponsive, references #5917

diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index 4cd0b36a9..f69509008 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -2584,6 +2584,7 @@ Datum relate_pattern(PG_FUNCTION_ARGS)
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	char *patt;
+	text *ptxt;
 	char result;
 	GEOSGeometry *g1, *g2;
 	size_t i;
@@ -2606,8 +2607,10 @@ Datum relate_pattern(PG_FUNCTION_ARGS)
 		HANDLE_GEOS_ERROR("Second argument geometry could not be converted to GEOS");
 	}
 
-	patt =  DatumGetCString(DirectFunctionCall1(textout,
-	                        PointerGetDatum(PG_GETARG_DATUM(2))));
+	/* Ensure DE9IM pattern is no more than 9 chars */
+	ptxt = DatumGetTextP(DirectFunctionCall2(text_left,
+	               PG_GETARG_DATUM(2), Int32GetDatum(9)));
+	patt = text_to_cstring(ptxt);
 
 	/*
 	** Need to make sure 't' and 'f' are upper-case before handing to GEOS

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

Summary of changes:
 NEWS                  | 1 +
 postgis/lwgeom_geos.c | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list