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 out of bounds read in slarrv #625

Merged

Commits on Sep 30, 2021

  1. Fix out of bounds read in slarrv

    This was originally reported as JuliaLang/julia#42415.
    I've tracked this down to an our of bounds read on the following line:
    
    https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L423
    
    In the crashing example, `M` is `0`, causing `slarrv` to read uninitialized
    memory from the work array. I believe the `0` for `M` is correct and indeed,
    the documentation above supports that `M` may be zero:
    
    https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L113-L116
    
    I believe it may be sufficient to early-out this function as suggested
    in this PR. However, I have limited context for the full routine here,
    so I would appreciate a sanity check.
    Keno committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    0631b6b View commit details
    Browse the repository at this point in the history