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

Refactor unsafe code in raw_jobs.rs for better memory safety #212

Merged
merged 1 commit into from
Oct 25, 2024

Commits on Oct 24, 2024

  1. Refactor unsafe code in raw_jobs.rs for better memory safety

    A potential issue was present where the check to the pointed to memory
    was done independently to the cast to the Rust type. The check was meant
    to protect from casting memory in an invalid state, but did not protect
    from the memory being modified in between the check and the cast.
    
    This new version creates a copy on the stack _first_. This way, we can
    safely validate it and trust our own memory to still be valid when we
    call `assume_init()`.
    Santiago Cingolani committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    4c6d073 View commit details
    Browse the repository at this point in the history