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

Require matching data types in MDArray::read_into_slice #300

Merged
merged 1 commit into from Sep 2, 2022

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Sep 2, 2022

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

We don't support GEDTC_COMPOUND anyway because of the GdalType bound. This is stricter than it could be, but should be fine as a quick workaround for #290. We should pass in the data type of the buffer, but it wasn't obvious to me how to do that.

Fixes #290

src/raster/mdarray.rs Outdated Show resolved Hide resolved
@ChristianBeilschmidt
Copy link
Contributor

Looks more robust now.
If this resolves the ASAN issue #290, I would like to merge it.

@jdroenner
Copy link
Member

bors merge

@lnicola
Copy link
Member Author

lnicola commented Sep 2, 2022

If this resolves the ASAN issue #290

It does, I included that part in test_read_string_array.

It actually didn't need ASAN to crash, it was a blatant buffer overrun.

@bors
Copy link
Contributor

bors bot commented Sep 2, 2022

Build succeeded:

@bors bors bot merged commit 260494b into georust:master Sep 2, 2022
@lnicola lnicola deleted the mdarray-read-as-check-type branch September 2, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MDArray: Different read type compared to array type leads to ASAN issues
3 participants