From: Darafei Praliaskouski Date: Sat, 21 Apr 2018 13:17:14 +0000 (+0000) Subject: ST_ClusterKMeans crash on NULL and EMPTY X-Git-Tag: 2.3.8~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dce537fb136d0e5bb9714fd747dd813a487ea1b8;p=postgis ST_ClusterKMeans crash on NULL and EMPTY Closes #4071 git-svn-id: http://svn.osgeo.org/postgis/branches/2.3@16549 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index 8eefaeafe..2f91b1286 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +PostGIS 2.3.8 +2018/xx/xx + + * Bug Fixes and Enchantments + + - #4071, ST_ClusterKMeans crash on NULL/EMPTY fixed (Darafei Praliaskouski) + + PostGIS 2.3.7 2018/04/06 diff --git a/liblwgeom/lwkmeans.c b/liblwgeom/lwkmeans.c index 53d02aecc..4720956a7 100644 --- a/liblwgeom/lwkmeans.c +++ b/liblwgeom/lwkmeans.c @@ -92,7 +92,7 @@ lwgeom_cluster_2d_kmeans(const LWGEOM **geoms, int ngeoms, int k) assert(k>0); assert(ngeoms>0); assert(geoms); - + if (ngeoms