Opened 9 years ago

Closed 9 years ago

#3565 closed defect (fixed)

st_setpoint crashes database when used on an empty linestring

Reported by: samuelspurling Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.2.3
Component: postgis Version: 2.2.x
Keywords: setpoint Cc:

Description

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

Change History (3)

comment:1 by strk, 9 years ago

Priority: highblocker

comment:2 by pramsey, 9 years ago

Milestone: PostGIS PostgreSQLPostGIS 2.2.3

comment:3 by pramsey, 9 years ago

Resolution: fixed
Status: newclosed

fixed in 2.0 at r14918, 2.1 at r14919, 2.2 at r14920

Note: See TracTickets for help on using tickets.