[postgis-tickets] [PostGIS] #3565: st_setpoint crashes database when used on an empty linestring

PostGIS trac at osgeo.org
Wed May 25 06:16:36 PDT 2016


#3565: st_setpoint crashes database when used on an empty linestring
----------------------------+--------------------------------
 Reporter:  samuelspurling  |      Owner:  pramsey
     Type:  defect          |     Status:  new
 Priority:  high            |  Milestone:  PostGIS PostgreSQL
Component:  postgis         |    Version:  2.2.x
 Keywords:  setpoint        |
----------------------------+--------------------------------
 Using st_setpoint on a empty linestring causes database to crash.

 {{{
 select st_setpoint(st_geomfromtext('LINESTRING EMPTY'), 0 ,
 st_makepoint(1,1))
 }}}

 Error:
 File: lwgeom_api.c, Line 504
 Expression: n >= 0 && n < pa->npoints

 Affected:
 2.0.8SVN
 2.1.9dev
 2.1.3
 2.2.2dev

 Not Affected:
 2.3.0dev

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3565>
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