[postgis-tickets] r15624 - #3829 Segfault in LWGEOM2GEOS
Paul Ramsey
pramsey at cleverelephant.ca
Tue Sep 5 09:57:50 PDT 2017
Author: pramsey
Date: 2017-09-05 09:57:50 -0700 (Tue, 05 Sep 2017)
New Revision: 15624
Modified:
branches/2.0/liblwgeom/cunit/cu_geos.c
branches/2.0/liblwgeom/lwgeom_geos.c
Log:
#3829 Segfault in LWGEOM2GEOS
Modified: branches/2.0/liblwgeom/cunit/cu_geos.c
===================================================================
--- branches/2.0/liblwgeom/cunit/cu_geos.c 2017-09-05 09:37:56 UTC (rev 15623)
+++ branches/2.0/liblwgeom/cunit/cu_geos.c 2017-09-05 16:57:50 UTC (rev 15624)
@@ -35,6 +35,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: branches/2.0/liblwgeom/lwgeom_geos.c
===================================================================
--- branches/2.0/liblwgeom/lwgeom_geos.c 2017-09-05 09:37:56 UTC (rev 15623)
+++ branches/2.0/liblwgeom/lwgeom_geos.c 2017-09-05 16:57:50 UTC (rev 15624)
@@ -387,7 +387,7 @@
g = LWGEOM2GEOS(lwc->geoms[i]);
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