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

fix UB in shuffle and unshuffle by marking _dst non-const #638

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

EmilDohne
Copy link
Contributor

Context:

#636 I noticed while running my library that relies on blosc2 under fsanitize=undefined that the shuffle implementations did not all have _dest marked as const while the function calling it did. Upon further investigation the function calling shuffle and unshuffle did not have any of these marked as const so there was no deeper impact but I wanted to address it anyways.

Changes:

  • make shuffle and unshuffle funcs take a non-const uint8_t* for _dest
  • Checked that none of the shuffle implementations also had their _src marked as non-const.

@FrancescAlted
Copy link
Member

LGTM. Thanks @EmilDohne !

@FrancescAlted FrancescAlted merged commit 52e7e4e into Blosc:main Oct 23, 2024
16 of 17 checks passed
@EmilDohne EmilDohne deleted the fix_ub_in_shuffle_and_unshuffle branch October 23, 2024 08:28
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.

2 participants