Opening and closing some HDF4 files results in heap corruption due to a double-free.
Suggested patch
warmerda@amd64[15]% svn diff hdf4imagedataset.cpp
Index: hdf4imagedataset.cpp
===================================================================
--- hdf4imagedataset.cpp (revision 11740)
+++ hdf4imagedataset.cpp (working copy)
@@ -1609,8 +1609,8 @@
if ( nLatCount && nLongCount && nLatCount == nLongCount
&& pLat && pLong )
{
- if ( pszGCPProjection )
- CPLFree( pszGCPProjection );
+ CPLFree( pszGCPProjection );
+ pszGCPProjection = NULL;
// ASTER Level 1A
if ( eProduct == PROD_ASTER_L1A )