[postgis-devel] [PostGIS] #1263: [raster] md5(NULL::raster) crashes the process

Sandro Santilli strk at keybit.net
Wed Nov 2 01:55:20 PDT 2011


On Tue, Nov 01, 2011 at 10:49:14PM -0000, PostGIS wrote:
> #1263: [raster] md5(NULL::raster) crashes the process
> ----------------------------+-----------------------------------------------
>  Reporter:  dustymugs       |       Owner:  dustymugs    
>      Type:  defect          |      Status:  new          
>  Priority:  medium          |   Milestone:  PostGIS 2.0.0
> Component:  postgis raster  |     Version:  trunk        
>  Keywords:                  |  
> ----------------------------+-----------------------------------------------
>  The following crashes the postgresql process.
> 
>  {{{
>  SELECT md5(NULL::raster)
>  }}}
> 
>  Crash is caused in RASTER_to_bytea() where arg 0 is NULL.
> 
>  {{{
>  pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
>  }}}

Marking the function as STRICT should fix this.

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list