Open Koral77 opened 1 year ago
Thanks! I don't have time to investigate this but would accept PRs for it!
In general the cursor APIs have a couple bugs
For arithmetic overflow panics, I think we just need to wrap them with safer functions like saturating_x
to deal with these edge cases.
I'll try to work on it.
I have used afl.rs to fuzz all public API of thie crate. And I found several cases may cause panic. The code to replay these panics are as follows:
These 6 cases are about arithmetic overflow.
These 2 cases are about utf-8 error and panicked at 'byte index is not a char boundary'.
These 2 cases are about unwrap error.
This case is about out-of-bound error.
The simple bug report of this case is
I also placed the replay files at replay_files.
I hope you can check if these are real bugs need to be fixed. Thanks a lot.