Opened 13 years ago
Closed 13 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 by , 13 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | SAR_CEOS added |
Milestone: | → 1.8.1 |
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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).