Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

rouault
Copy link
Member

@rouault rouault commented May 14, 2024

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 rasterio/rasterio#3028

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 rasterio/rasterio#3028
@coveralls
Copy link
Collaborator

Coverage Status

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants