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 crash when incorrectly accessing a compressed vector v via v{...}[...] or v{...}{...} as if it was a matrix #4442

Merged
merged 1 commit into from
Apr 30, 2021

Commits on Apr 29, 2021

  1. Fix crashes accessing compressed vectors as matrices

    For a compressed vector `v`, writing code involving `v{...}[...]` and
    `v{...}{...}` would crash GAP.
    
    A subset of this was originally reported by me in 2013 (on the old GAP issue
    tracker, hence the issue number 312 you may see inside this PR is not valid
    here on GitHub), and later fixed with a workaround. However, back then I did
    not realize that there are in total four places that needed the fix, and so
    only fixed one of them. I also thought it was just a workaround for a deeper
    issue. Upon reanalyzing, I believe this was wrong; the real bug always was
    lack of input validation combined with an incorrect use of a feature for
    accessing slices of matrices with a vector as input instead of a matrix.
    
    For further details, please read the comment in the test file in this patch.
    fingolfin committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    6508a60 View commit details
    Browse the repository at this point in the history