[postgis-tickets] r14422 - #3375, crash on repeated point removal

Paul Ramsey pramsey at cleverelephant.ca
Wed Nov 25 10:02:44 PST 2015


Author: pramsey
Date: 2015-11-25 10:02:44 -0800 (Wed, 25 Nov 2015)
New Revision: 14422

Modified:
   branches/2.2/NEWS
   branches/2.2/liblwgeom/lwgeom.c
Log:
#3375, crash on repeated point removal


Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2015-11-24 09:22:39 UTC (rev 14421)
+++ branches/2.2/NEWS	2015-11-25 18:02:44 UTC (rev 14422)
@@ -13,6 +13,7 @@
   - #3359, Fix toTopoGeom loss of low-id primitives from TopoGeometry
            definition
   - #3360, _raster_constraint_info_scale invalid input syntax
+  - #3375, crash in repeated point removal for collection(point)
 
 
 PostGIS 2.2.0

Modified: branches/2.2/liblwgeom/lwgeom.c
===================================================================
--- branches/2.2/liblwgeom/lwgeom.c	2015-11-24 09:22:39 UTC (rev 14421)
+++ branches/2.2/liblwgeom/lwgeom.c	2015-11-25 18:02:44 UTC (rev 14422)
@@ -1436,7 +1436,7 @@
 	case TRIANGLETYPE:
 	case TINTYPE:
 		/* No point is repeated for a single point, or for Triangle or TIN */
-		return in;
+		return lwgeom_clone_deep(in);
 
 	case CIRCSTRINGTYPE:
 	case COMPOUNDTYPE:
@@ -1444,12 +1444,12 @@
 	case CURVEPOLYTYPE:
 	case MULTISURFACETYPE:
 		/* Dunno how to handle these, will return untouched */
-		return in;
+		return lwgeom_clone_deep(in);
 
 	default:
 		lwnotice("%s: unsupported geometry type: %s",
 		         __func__, lwtype_name(in->type));
-		return in;
+		return lwgeom_clone_deep(in);
 		break;
 	}
 	return 0;



More information about the postgis-tickets mailing list