What steps will reproduce the bug?
I executed fuzz testing with bat public APIs and found crash case.
let fuzz_arg1 = "18446744073709551615:+1";
LineRange::from(fuzz_arg1);
What happens?
Thread '<unnamed>' panicked at 'attempt to add with overflow', /rustc/871b5952023139738f72eba235063575062bc2e9/library/core/src/ops/arith.rs:109
The overflow occurs with this statement :
|
new_range.lower + more_lines |
What did you expect to happen instead?
Need assertion to prevent arith overflow, or need to explicitly mention panic condition.
What steps will reproduce the bug?
I executed fuzz testing with
batpublic APIs and found crash case.What happens?
The overflow occurs with this statement :
bat/src/line_range.rs
Line 56 in 5a240f3
What did you expect to happen instead?
Need assertion to prevent arith overflow, or need to explicitly mention panic condition.