[postgis-tickets] r15621 - #3829, Crash in LWGEOM2GEOS
Daniel Baston
dbaston at gmail.com
Mon Sep 4 10:42:11 PDT 2017
Author: dbaston
Date: 2017-09-04 10:42:11 -0700 (Mon, 04 Sep 2017)
New Revision: 15621
Modified:
trunk/liblwgeom/cunit/cu_geos.c
trunk/liblwgeom/lwgeom_geos.c
Log:
#3829, Crash in LWGEOM2GEOS
Modified: trunk/liblwgeom/cunit/cu_geos.c
===================================================================
--- trunk/liblwgeom/cunit/cu_geos.c 2017-09-04 00:37:56 UTC (rev 15620)
+++ trunk/liblwgeom/cunit/cu_geos.c 2017-09-04 17:42:11 UTC (rev 15621)
@@ -37,6 +37,7 @@
"SRID=100000;POLYGON((-1 -1 3,-1 2.5 3,2 2 3,2 -1 3,-1 -1 3),(0 0 3,0 1 3,1 1 3,1 0 3,0 0 3),(-0.5 -0.5 3,-0.5 -0.4 3,-0.4 -0.4 3,-0.4 -0.5 3,-0.5 -0.5 3))",
"SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))",
"SRID=4326;GEOMETRYCOLLECTION(POINT(0 1),POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0)),MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))))",
+ "GEOMETRYCOLLECTION( LINESTRING (1 1, 2 2), POINT EMPTY, TRIANGLE ((0 0, 1 0, 1 1, 0 0)) )",
};
Modified: trunk/liblwgeom/lwgeom_geos.c
===================================================================
--- trunk/liblwgeom/lwgeom_geos.c 2017-09-04 00:37:56 UTC (rev 15620)
+++ trunk/liblwgeom/lwgeom_geos.c 2017-09-04 17:42:11 UTC (rev 15621)
@@ -458,7 +458,7 @@
g = LWGEOM2GEOS(lwc->geoms[i], 0);
if ( ! g )
{
- while (i) GEOSGeom_destroy(geoms[--i]);
+ while (j) GEOSGeom_destroy(geoms[--j]);
free(geoms);
return NULL;
}
More information about the postgis-tickets
mailing list