Opened 14 years ago

Last modified 14 years ago

#708 closed defect

ST_ExteriorRing POLYGON EMPTY crash — at Version 4

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description (last modified by robe)

SELECT ST_ExteriorRing(ST_GeomFromText('POLYGON EMPTY',4326)) As result;

Which I think is the cause of ST_DumpPoints crashing as well

SELECT ST_DumpPoints(ST_GeomFromText('POLYGON EMPTY',4326)) As result;

Change History (4)

comment:1 by yabo, 14 years ago

Duplicate of #666. I attached a patch over there.

comment:2 by robe, 14 years ago

I don't think it's a duplicate call. I thought about it when I placed it. That other call was for NULL and PostGIS 1.5 doesn't crash when given the above query. So the crashing is a result of changes in PostGIS 2.0.

Paul -- sorry I think I might have missed this one since there wa a bug in my test.

comment:3 by yabo, 14 years ago

Sorry for reading too fast. So where do you think the problem might be? The patch I attached in #666 handles NULL and EMPTY geometries in ST_DumpPoints.

comment:4 by robe, 14 years ago

Description: modified (diff)
Summary: ST_DumpPoints POLYGON EMPTY crashST_ExteriorRing POLYGON EMPTY crash

Maxime, I think ST_DumpPoints is breaking by virtue of the fact that ST_ExteriorRing is the real culprit and it uses that when it sees a polygon type.

Note: See TracTickets for help on using tickets.