Opened 12 years ago

Closed 12 years ago

#1385 closed defect (fixed)

ST_Extent() segfaults on null geometries

Reported by: rouault Owned by: strk
Priority: critical Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

The following sequence causes a crash in BOX3D_combine(), line 348, on "GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_POINTER(1))"

CREATE TABLE test_crash_st_extent ( foo VARCHAR )
SELECT AddGeometryColumn('public','test_crash_st_extent','wkb_geometry',0,'GEOMETRY',2)
INSERT INTO test_crash_st_extent (foo) VALUES ('bar')
SELECT ST_Extent(\"wkb_geometry\") FROM test_crash_st_extent

Attached patch fixes the segfault

Attachments (1)

fix_segfault_in_BOX3D_combine.patch (539 bytes ) - added by rouault 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by strk, 12 years ago

Can anyone also test this on 1.5 ?

comment:2 by rouault, 12 years ago

It works on 1.5. This is a recent 2.0SVN regression. I had a previous revision of trunk dating from a few weeks ago where it worked. Detected by GDAL autotest ;-)

comment:3 by strk, 12 years ago

Owner: changed from pramsey to strk
Status: newassigned

comment:4 by strk, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r8451, thanks !

Note: See TracTickets for help on using tickets.