Opened 3 years ago

Closed 2 months ago

#3055 closed defect (fixed)

[raster] ST_Clip() on a raster without band crashes the server

Reported by: pracine Owned by: robe
Priority: high Milestone: PostGIS 2.2.7
Component: raster Version: 2.1.x
Keywords: Cc:

Description

SELECT ST_Clip(ST_MakeEmptyRaster(42, 42, 0, 0, 1.0, 1.0, 0, 0, 4269), ST_MakeEnvelope(0, 0, 20, 20, 4269));

crashes the server.

When the ST_Clip() crop parameter is set to TRUE, ST_Clip() could just change the extent of the empty raster.... When it is set to false, it could just return the raster unmodified.

Change History (12)

comment:1 Changed 3 years ago by Bborie Park

Status: newassigned

comment:2 Changed 3 years ago by Bborie Park

Milestone: PostGIS 2.1.6
Priority: mediumhigh

comment:3 Changed 3 years ago by pramsey

Milestone: PostGIS 2.1.6PostGIS 2.1.7

comment:4 Changed 3 years ago by robe

Milestone: PostGIS 2.1.7PostGIS 2.1.8

comment:5 Changed 3 years ago by pramsey

Milestone: PostGIS 2.1.8PostGIS 2.1.9

comment:6 Changed 8 months ago by pramsey

Milestone: PostGIS 2.1.9PostGIS 2.2.6

comment:7 Changed 7 months ago by pramsey

Milestone: PostGIS 2.2.6PostGIS 2.2.7

comment:8 Changed 2 months ago by robe

Owner: changed from Bborie Park to robe
Status: assignednew

This still crashes server even at 2.4

comment:9 Changed 2 months ago by robe

In 16503:

Fix crasher in raster when fed an empty raster (note was tempted to change the def of empty raster to include raster with no bands but not sure where else that is used, so just revised the clip check to not try to clip if no bands).
References #3055 for PostGIS 2.5 (trunk),
also minor doc fix references #2925 for PostGIS 2.5 (trunk)

comment:10 Changed 2 months ago by robe

In 16504:

Fix crasher in raster when fed an empty raster (note was tempted to change the def of empty raster to include raster with no bands but not sure where else that is used, so just revised the clip check to not try to clip if no bands).
References #3055 for PostGIS 2.4.4,
also minor doc fix references #2925 for PostGIS 2.4.4

comment:11 Changed 2 months ago by robe

In 16505:

Fix crasher in raster when fed an empty raster (note was tempted to change the def of empty raster to include raster with no bands but not sure where else that is used, so just revised the clip check to not try to clip if no bands).
References #3055 for PostGIS 2.3.7,
also minor doc fix references #2925 for PostGIS 2.3.7
reorder NEWS tickets numerically

comment:12 Changed 2 months ago by robe

Resolution: fixed
Status: newclosed

In 16506:

Fix crasher in raster when fed an empty raster (note was tempted to change the def of empty raster to include raster with no bands but not sure where else that is used, so just revised the clip check to not try to clip if no bands).
Closes #3055 for PostGIS 2.2.7
reorder NEWS tickets numerically

Note: See TracTickets for help on using tickets.