Ticket #1385 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

ST_Extent() segfaults on null geometries

Reported by: rouault Owned by: strk
Priority: critical Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
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

fix_segfault_in_BOX3D_combine.patch Download (0.5 KB) - added by rouault 17 months ago.

Change History

Changed 17 months ago by rouault

Changed 17 months ago by strk

Can anyone also test this on 1.5 ?

Changed 17 months ago by rouault

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 ;-)

Changed 17 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

Changed 17 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r8451, thanks !

Note: See TracTickets for help on using tickets.