Skip to content

Commit

Permalink
Return instead of abort for invalid merge input
Browse files Browse the repository at this point in the history
  • Loading branch information
Voultapher committed Aug 18, 2023
1 parent 2d524b1 commit b0370a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ where
let len = v.len();

if mid == 0 || mid >= len || scratch.len() < cmp::min(mid, len - mid) {
intrinsics::abort();
return;
}

// SAFETY: We checked that the two slices are non-empty and `mid` is in bounds. We checked that
Expand Down

0 comments on commit b0370a6

Please sign in to comment.