Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6965 closed defect (fixed)

VRT: GDALDatasetRasterIO (Read) problem with buffer initialization

Reported by: dengo Owned by: warmerdam
Priority: normal Milestone: 2.2.2
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: VRT
Cc:

Description

I recently noticed that, when reading a part of a VRT (GDALDatasetRasterIO) that is not covered by any input raster and the NODATA Value is not defined in the VRT, the pixels in the buffer are not set at all. Because I reuse the buffer and don't initialize it myself I get 'random' results.

As I said above, this problem does not happen when the NODATA Value is defined, but still this is probably not the desired behavior.

I started noticing this problem with GDAL 2.2. Perhaps it has something to do with the changelog entry for the VRT driver "avoid buffer initialization in RasterIO() when possible (replace ancient and likely broken concept of bEqualAreas)"

Also this problem does not seem to occur when using GDALRasterIO instead.

Change History (3)

comment:1 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39580:

VRT: fix uninitialized buffer in areas without sources when using non pixel packed spacing (fixes #6965)

comment:2 by Even Rouault, 7 years ago

In 39581:

VRT: fix uninitialized buffer in areas without sources when using non pixel packed spacing (fixes #6965)

comment:3 by dengo, 7 years ago

Thanks for the quick fix.

Note: See TracTickets for help on using tickets.