Ticket #3926 (closed defect: fixed)
Probable logic errors in NITF driver
| Reported by: | klaricmn | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.9.0 |
| Component: | GDAL_Raster | Version: | unspecified |
| Severity: | normal | Keywords: | nitf |
| Cc: |
Description
In two locations within nitfimage.c a check is performed to determine if an image is tiled or not prior to performing scanline operations. I believe these checks to be incorrect because they fail (saying that the image is tiled) if either psImage->nBlocksPerRow or psImage->nBlocksPerColumn is not equal to 1. Thus, the only way that an image cannot be considered tiled by this definition is to have the entire image be one big tile. That's not really scanline access in that case.
The attached patch, modifies those two checks such that an image is considered tiled if both psImage->nBlocksPerRow and psImage->nBlocksPerColumn are not equal to 1.

