[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-503-g364d748

git at osgeo.org git at osgeo.org
Sun Sep 5 22:42:26 PDT 2021


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  364d7480586c29b59cecddfb03294d0164ae3d88 (commit)
       via  81bcf3df3ff721a4daa0644652fca1d6bd3f8879 (commit)
      from  884258173c78203a99e843739122e2a43cbb6369 (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 364d7480586c29b59cecddfb03294d0164ae3d88
Merge: 8842581 81bcf3d
Author: kalenikaliaksandr <kalenik.aliaksandr at gmail.com>
Date:   Sun Sep 5 22:25:15 2021 +0000

    Merge 81bcf3df3ff721a4daa0644652fca1d6bd3f8879 into 884258173c78203a99e843739122e2a43cbb6369


commit 81bcf3df3ff721a4daa0644652fca1d6bd3f8879
Author: kalenikaliaksandr <kalenik.aliaksandr at gmail.com>
Date:   Mon Sep 6 01:24:35 2021 +0300

    fix kmeans crash on 32-bit. Closes #4985

diff --git a/postgis/lwgeom_window.c b/postgis/lwgeom_window.c
index dd1bfb1..7a71591 100644
--- a/postgis/lwgeom_window.c
+++ b/postgis/lwgeom_window.c
@@ -211,9 +211,12 @@ Datum ST_ClusterKMeans(PG_FUNCTION_ARGS)
 
 		/* Maximum cluster radius. 0 if not set*/
 		argdatum = WinGetFuncArgCurrent(winobj, 2, &isnull);
-		max_radius = DatumGetFloat8(argdatum);
-		if (isnull || max_radius <= 0)
-			max_radius = 0.0;
+		if (!isnull)
+		{
+			max_radius = DatumGetFloat8(argdatum);
+			if (max_radius < 0)
+				max_radius = 0.0;
+		}
 
 		/* Error out if N < K */
 		if (N<k)

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

Summary of changes:
 postgis/lwgeom_window.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list