-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 access by checking length equality BEFORE accessing by index. #5784
Conversation
r? @phansch (rust_highfive has picked a reviewer for you, use r? to override) |
Yeah, I agree that would be pretty difficult 😅 Since it only happened in rustc so far, let's just go ahead and @bors r+ |
📌 Commit 1b3bc16 has been approved by |
Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes #5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.
💔 Test failed - checks-action_test |
@bors rollup=always |
@bors retry |
Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes rust-lang#5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.
Rollup of 5 pull requests Successful merges: - #5443 (Some accuracy lints for floating point operations) - #5752 (Move range_minus_one to pedantic) - #5756 (unnecessary_sort_by: avoid linting if key borrows) - #5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - #5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup
Fixes #5780
changelog: fix out of bounds access in unnested_or_patterns lint.
Edit: I did not bother reducing a testcase from
librustc_typeck
crate but I can confirm that with the change the crash no longer occurs.