mapnik/mapnik — pull request #2615 by rafatower (2014-12-18 17:47:24+00:00)
Title: Limit size of raster buffer

Right now the pgraster_datasource can feed the raster symbolizer with
tiles that are first scaled up then cropped and that might result in the
symbolizer trying to allocate insane amounts of memory to just scale up
a few pixels.

This is also the source of some problems such as the bad_alloc when
raster_width * raster_height overflow and tries a mem alloc with a
negative value.