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

util: Zero-initialize result to prevent possible uninit memory read #470

Merged
merged 1 commit into from
Aug 23, 2021

Commits on Aug 23, 2021

  1. util: Zero-initialize result to prevent possible uninit memory read

    Fixes #354
    
    `io::Read::read_exact` does not receive `MaybeUninit` memory and a trait
    implementation can possibly read from our uninitialized vector without
    `unsafe`, which is UB.  As there is no proper solution to this problem
    yet (see linked issue), our safest bet is to just take the perf-hit and
    zero-initialize this vector.
    MarijnS95 committed Aug 23, 2021
    Configuration menu
    Copy the full SHA
    ea809ba View commit details
    Browse the repository at this point in the history