#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 Changed 17 months ago by strk

Priority: highblocker

comment:2 Changed 17 months ago by pramsey

Milestone: PostGIS PostgreSQLPostGIS 2.2.3

comment:3 Changed 17 months ago by pramsey

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.