#5456 closed defect (fixed)

garden crash on ST_LineLocatePoint geography with one point geography line

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 3.4.0
Component: postgis Version: master
Keywords: Cc:

Description

I think the gardener was able to generate this one point line using ST_MakeLine. Trying to do it with ST_GeomFromText is not possible.

Anyway here is the simplest I could reduce it to:

SELECT ST_LineLocatePoint('0102000020E610000001000000000000000000F03F0000000000000040'::geography, 'POINT(-11.1111111 40)'::geography, false);

Change History (3)

comment:1 by robe, 18 months ago

gdb backtrace

Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 19048.0x4c84]
0x0000000063f661c0 in ptarray_locate_point_spheroid (pa=pa@entry=0x7a23368,
    p4d=p4d@entry=0x52de9c0, s=s@entry=0x52dea00,
    tolerance=tolerance@entry=5.0000000000000002e-14,
    mindistout=mindistout@entry=0x0, proj4d=proj4d@entry=0x52de9e0)
    at lwgeodetic_measures.c:405
405                             *mindistout = s->radius * sphere_distance(&a, &b);

comment:2 by robe, 18 months ago

Reported on MobilityDb at https://github.com/MobilityDB/MobilityDB/issues/354

As expected theirs crashes too.

comment:3 by Paul Ramsey <pramsey@…>, 17 months ago

Resolution: fixed
Status: newclosed

In 0abe88bb/git:

Check return pointer before setting it. Closes #5456

Note: See TracTickets for help on using tickets.