gyscos / gyscos/cursive

Use something other than ncurses by default

Open
#411 13 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

README states that Cursive uses ncurses backend by default. Sadly Rust bindings for `ncurses` are very problematic from the safety point of view:

- `ncurses` crate is wildly unsound. It simply wraps calls to C functions in Rust functions and declares them safe, with no validation whatsoever. It has format string vulnerabilities, returns invalid UTF-8 in &str, and so much other unsoundness that you can cause pretty much arbitrary memory corruption. It is also unmaintained. See https://github.com/jeaye/ncurses-rs/issues/188
- `pancurses` crate depends on `ncurses` and inherits the issues.

This presents issues from both security and reliability standpoints. Please consider switching to a backend other than ncurses by default. If Rust-only backends are not anticipated to reach parity with ncurses anytime soon, consider using [ncursesw](https://crates.io/crates/ncursesw) crate - I have not audited it, but it seems to be less of a lost cause than `ncurses` crate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.