Opened 11 years ago

Closed 11 years ago

#4065 closed defect (fixed)

CEOS2: memory access violation when reading file list

Reported by: belikov Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: 1.8.0
Severity: normal Keywords: SAR_CEOS


In file frmts\ceos2\sar_ceosdataset.cpp, line ~1683:

sprintf( szThisExtension, "%s%s", 
         pszExtension+3 );

if there are files without extension in directory, then pszExtension is "" and pszExtension+3 cause to memory access violation. It should be condition check:

if (pszExtension[0] != '\0')
    sprintf( szThisExtension, "%s%s", 
         pszExtension+3 );
    sprintf( szThisExtension, "%s", 

Change History (1)

comment:1 by warmerdam, 11 years ago

Component: defaultGDAL_Raster
Keywords: SAR_CEOS added
Milestone: 1.8.1
Resolution: fixed
Status: newclosed

Agreed, I have applied a slightly different version of the patch (avoiding issues with 1 and 2 character extensions) in trunk (r22301) and 1.8 branch (r22302).

Note: See TracTickets for help on using tickets.