Opened 13 years ago
Closed 13 years ago
#4104 closed defect (fixed)
IReadBlock / IWriteBlock fail to seek
Reported by: | lucasvr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.1 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | major | Keywords: | IReadBlock IWriteBlock seek |
Cc: |
Description
The SAGA Raster module may fail to seek to certain file offsets depending on the input file size.
The computation of the offset performed in SAGARasterBand::{IReadBlock,IWriteBlock} on n_mBits, nRasterXSize, nRasterYSize and nBlockYOff results in a signed 32-bit temporary value. As a consequence, if the resulting offset is not within the 32-bit range, a truncated or potentially negative value could be provided to VSIFSeekL(), causing runtime errors such as:
ERROR 3: Unable to seek to beginning of grid row. ERROR 1: IReadBlock failed at X offset 0, Y offset 6684 ERROR 3: Unable to seek to beginning of grid row. ERROR 1: IReadBlock failed at X offset 0, Y offset 6685 ERROR 3: Unable to seek to beginning of grid row. [...]
Attachments (1)
Change History (2)
by , 13 years ago
Attachment: | IReadWriteBlock-SeekOffset.patch added |
---|
comment:1 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Proposal fix for the problem, based on GDAL 1.8.0.