[postgis-devel] [PostGIS] #494: [wktraster] ST_DumpAsPolygons crashes under MingW compiled wktraster (gdal)

Jorge Arevalo jorgearevalo at gis4free.org
Thu Apr 22 02:05:22 PDT 2010


On Wed, Apr 21, 2010 at 8:50 PM, PostGIS <trac at osgeo.org> wrote:
> #494: [wktraster] ST_DumpAsPolygons crashes under MingW compiled wktraster (gdal)
> ------------------------+---------------------------------------------------
>  Reporter:  robe       |       Owner:  pracine
>      Type:  defect     |      Status:  new
>  Priority:  medium     |   Milestone:  WKTRaster 0.1.6
>  Component:  wktraster  |     Version:  trunk
> Resolution:             |    Keywords:
> ------------------------+---------------------------------------------------
> Comment (by pracine):
>
>  The crash happen in GDAL-MEMRasterBand::IReadBlock:
>
>  memcpy( pImage, pabyData + nLineOffset*(size_t)nBlockYOff, nPixelOffset *
>  nBlockXSize );
>
>  Any idea?
>

I think so. When creating a new GDALRasterBand in
rt_raster_dump_as_wktpolygons, there was a static array to store the
data. It was a clear error (my fault, of course, and I'm really
sorry), that could produce access violation if the band data are
bigger than the array size.

Now, the memory is allocated based on the raster dimensions and the
band datatype. Commited in r5570.

I hope this helps...


> --
> Ticket URL: <http://trac.osgeo.org/postgis/ticket/494#comment:4>
> PostGIS <http://trac.osgeo.org/postgis/>
> The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.



More information about the postgis-devel mailing list