Opened 12 years ago

Closed 12 years ago

#1316 closed defect (fixed)

[raster] Invalid band number makes ST_MapAlgebraExpr for 2 rasters to crash

Reported by: pracine Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

This works:

SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 6, -1), 1, 
                         ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 4, -1), 1, 
                         'rast1 + rast2'::text, 
                         NULL::text, 
                         'UNION'::text, 
                         NULL::text, 
                         NULL::text, 
                         NULL::double precision); 

but this crashes:

SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 6, -1), 1, 
                         ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 4, -1), 2, 
                         'rast1 + rast2'::text, 
                         NULL::text, 
                         'UNION'::text, 
                         NULL::text, 
                         NULL::text, 
                         NULL::double precision); 

the only difference is a refer to a non existing band number in the second case.

Change History (2)

comment:1 by Bborie Park, 12 years ago

Owner: changed from pracine to Bborie Park
Status: newassigned

Should be fixed in r8216

comment:2 by Bborie Park, 12 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.