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 some unsoundness issues #541

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Fix some unsoundness issues #541

merged 2 commits into from
Aug 16, 2023

Conversation

liamwhite
Copy link
Contributor

@liamwhite liamwhite commented Aug 15, 2023

  1. The subtraction and addition of folder_offsets in extensions.rs intentionally overflows, twice. This was changed to the wrapping_ version of this operation.
  2. vectors obtained from the game may have a nullptr __begin_ if they are zero-sized. Constructing zero-sized slices with a null pointer (happens during make_addition_context()) is unsound, so a branch was added to handle the case of a zero-sized vector.

@Raytwo Raytwo merged commit 696e28c into Raytwo:master Aug 16, 2023
1 check failed
@Raytwo
Copy link
Owner

Raytwo commented Aug 16, 2023

Appreciate it, thanks!

@liamwhite liamwhite deleted the safety branch August 16, 2023 15:17
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.

3 participants