Ticket #1316 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

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

Reported by: pracine Owned by: dustymugs
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: trunk
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

Changed 18 months ago by dustymugs

  • owner changed from pracine to dustymugs
  • status changed from new to assigned

Should be fixed in r8216

Changed 18 months ago by dustymugs

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.