Opened 17 years ago
Closed 17 years ago
#1701 closed defect (fixed)
Crash reading some HDF4 files - double free of pszGCPProjection
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.3 |
Component: | GDAL_Raster | Version: | 1.4.2 |
Severity: | normal | Keywords: | hdf4 |
Cc: |
Description
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 )
Note:
See TracTickets
for help on using tickets.
Patch applied in trunk, 1.4.x branch and 1.4-esri branch.