Opened 6 years ago

Closed 6 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
Cc:

Description

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

sprintf( szThisExtension, "%s%s", 
         CeosExtension[e][iFile], 
         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", 
         CeosExtension[e][iFile], 
         pszExtension+3 );
else
    sprintf( szThisExtension, "%s", 
         CeosExtension[e][iFile]);

Change History (1)

comment:1 Changed 6 years ago by warmerdam

  • Component changed from default to GDAL_Raster
  • Keywords SAR_CEOS added
  • Milestone set to 1.8.1
  • Resolution set to fixed
  • Status changed from new to closed

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.