Opened 15 years ago

Closed 15 years ago

#3069 closed defect (fixed)

GDALDefaultOverviews::BuildOverviews() causes out-of-bounds writes for a 1x1 dataset

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.6.2
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

The following snippet causes an out-of-bound write at line 597 of gdaldefaultoverviews.cpp (papoOverviewBands[nNewOverviews++] = poOverview)

import gdal
ds = gdal.GetDriverByName('GTiff').Create('test.tif', 1, 1, 1)
ds = None
ds = gdal.Open('test.tif')
ds.BuildOverviews('NEAREST', overviewlist = [2, 4])
ds = None

Change History (1)

comment:1 by Even Rouault, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r17411) and branches/1.6 (r17412). Test added in r17413

Note: See TracTickets for help on using tickets.