gdal icon indicating copy to clipboard operation
gdal copied to clipboard

GDALNoDataMaskBand::IRasterIO(): fix crash on memory allocation failure

Open rouault opened this issue 1 year ago • 1 comments

The method had a fallback path when allocating a temporary buffer of the size of the one passed ot the method, that intended to use a less memory intensive block-based approach, but this was buggy. Fix this, and add testing for the fallback. Also, when attempting the fallback, emits a CE_Warning instead of a CE_Failure.

Fixes https://github.com/rasterio/rasterio/discussions/3028

rouault avatar May 14 '24 22:05 rouault

Coverage Status

coverage: 69.103% (+0.004%) from 69.099% when pulling 5b28d32de4abd0aa68ee2d0aea334b980457b4a2 on rouault:fix_GDALNoDataMaskBand_IRasterIO_failure into 1687a3104223b019c3f26fb9964527be1bb6362e on OSGeo:master.

coveralls avatar May 15 '24 00:05 coveralls