0.3.1 (older version) Thoroughness: Medium Understanding: Medium
by MaulingMonkey on 2019-09-26
This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
The current version of crossterm_cursor is 0.4.0.
0.3.1 (older version) Thoroughness: Medium Understanding: Medium
by MaulingMonkey on 2019-09-26
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository with a git tag matching the version. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open crossterm_cursor
. Alternatively, you can download the tarball of crossterm_cursor v0.4.0 or view the source online.
Pros:
Cons:
src/sys/winapi.rs
unsafe { ... }
- would be valid if screen buffer handle was guaranteed validunsafe { ... }
- would be valid if screen buffer handle was guaranteed validIssue: Medium (github.com/crossterm-rs/crossterm/issues/199)
Getting the cursor pos in ANSI mode can drop stdin data
Issue: High (github.com/crossterm-rs/crossterm/issues/245)
Winapi save/restore cursor invokes undefined behavior:
static mut SAVED_CURSOR_POS
not guardedIssue: High (github.com/crossterm-rs/crossterm/issues/252)
Unsound access of possibly invalid
HANDLE
s