Opened 15 years ago
Closed 5 years ago
#2891 closed defect (wontfix)
RS2 driver: some questions after code review ?
Reported by: | Even Rouault | Owned by: | pvachon |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | antonio |
Description
Phil,
here are a few observations on RS2CalibRasterBand::IReadBlock() while reviewing RS2 driver :
- around line 431, we have 2 GDALSwapWords done on pImage buffer, but we have just read above in the pnImageTmp buffer. This looks like a bug.
- I think that the pnImageTmp buffer is unnecessary. We could read directly in the pImage buffer and modify it afterwards.
- The expression m_nfTable[nBlockXOff + j] looks suspicious because we add block offset and pixel offset. But I suspect that generally the underlying GeoTIFF is scanline oriented, so nBlockXOff would be always 0. However the code doesn't seem to be ready to accept a tiled GeoTIFF here contrary to RS2RasterBand::IReadBlock()
- We don't check that the m_nfTable is large enough. (if the lut.xml was corrupted for example, we could read out of bounds)
Change History (3)
comment:1 by , 15 years ago
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Note:
See TracTickets
for help on using tickets.
Cheers, P.