[postgis-tickets] [PostGIS] #3225: unchecked return value returned by _lwt_CheckEdgeCrossing()

PostGIS trac at osgeo.org
Sat Aug 1 11:06:39 PDT 2015


#3225: unchecked return value returned by _lwt_CheckEdgeCrossing()
-----------------------+---------------------------
 Reporter:  esseffe    |      Owner:  pramsey
     Type:  defect     |     Status:  new
 Priority:  high       |  Milestone:  PostGIS 2.2.0
Component:  liblwgeom  |    Version:  2.1.x
 Keywords:             |
-----------------------+---------------------------
 _lwt_CheckEdgeCrossing() is called twice within the lwgeom_topo.c source
 (near lines 766 and 2144), and in both cases its return value is
 systematically ignored.

 a more robust implementation should always test the return value then
 immediately returning an error when this function identifies a topology
 inconsistency, something like this:

 {{{
    if ( ! skipISOChecks )
 -   _lwt_CheckEdgeCrossing( topo, startNode, endNode, geom );
 + {
 +    if (_lwt_CheckEdgeCrossing( topo, startNode, endNode, geom ) < 0)
 +        return -1;
 + }
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3225>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list