[postgis-tickets] r14667 - Fix crash on face-collapsing edge change

Sandro Santilli strk at keybit.net
Tue Feb 23 08:38:33 PST 2016


Author: strk
Date: 2016-02-23 08:38:32 -0800 (Tue, 23 Feb 2016)
New Revision: 14667

Modified:
   branches/2.2/NEWS
   branches/2.2/liblwgeom/lwgeom_topo.c
Log:
Fix crash on face-collapsing edge change

See #3463

Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2016-02-23 15:53:12 UTC (rev 14666)
+++ branches/2.2/NEWS	2016-02-23 16:38:32 UTC (rev 14667)
@@ -3,6 +3,7 @@
 
  * Bug Fixes *
 
+  - #3463, Fix crash on face-collapsing edge change
   - #3422, Improve ST_Split robustness on standard precision double
            systems (arm64, ppc64el, s390c, powerpc, ...)
   - #3427, Update spatial_ref_sys to EPSG version 8.8

Modified: branches/2.2/liblwgeom/lwgeom_topo.c
===================================================================
--- branches/2.2/liblwgeom/lwgeom_topo.c	2016-02-23 15:53:12 UTC (rev 14666)
+++ branches/2.2/liblwgeom/lwgeom_topo.c	2016-02-23 16:38:32 UTC (rev 14667)
@@ -3578,6 +3578,13 @@
   if ( oldedge->face_left != 0 )
   {
     nface1 = lwt_GetFaceGeometry(topo, oldedge->face_left);
+    if ( ! nface1 )
+    {
+      lwerror("lwt_ChangeEdgeGeom could not construct face %"
+                 PRId64 ", on the left of edge %" PRId64,
+                oldedge->face_left, edge_id);
+      return -1;
+    }
 #if 0
     {
     size_t sz;
@@ -3596,6 +3603,13 @@
        && oldedge->face_right != oldedge->face_left )
   {
     nface2 = lwt_GetFaceGeometry(topo, oldedge->face_right);
+    if ( ! nface2 )
+    {
+      lwerror("lwt_ChangeEdgeGeom could not construct face %"
+                 PRId64 ", on the right of edge %" PRId64,
+                oldedge->face_right, edge_id);
+      return -1;
+    }
 #if 0
     {
     size_t sz;



More information about the postgis-tickets mailing list