Frank Warmerdam wrote:
Folks,

I had a serious problem reported by a client of mine. The issue turned out
to be that the OSGeo4W GEOS package was built with a different version of
visual studio than the OSGeo4W GDAL package.  The GDAL package calls:

    pabyBuf = GEOSGeomToWKB_buf( geosGeom, &nSize );
    ...
    free( pabyBuf );

The problem is that the buffer allocated by GEOS c-runtime is being freed
with the free() of the GDAL c-runtime resulting in heap corruption.

For things like geometry and coordinate sequences we have special
deallocators available as part of the GEOS C API.  However this is not
the case (as far as I know) for plain malloc()/free() type stuff.

So my questions are:

 1) Am I missing an existing GEOSFree() function?

Folks,

Howard has pointed out that this is already a known issue, listed in:

  http://trac.osgeo.org/geos/ticket/249

I see Paul has "accepted" the ticket, but I don't see any sign that it
has been incorporated.  Also, what constraints do we have on backporting
an API *addition* like this?

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to