vasilito bfb5f8b2ca libredox: replace demux() .expect() with .unwrap_or(u16::MAX)
CRITICAL F3.1 from NETWORKING-AND-DRIVERS-CODE-ASSESSMENT-2026-07-27.md
§3.4: demux() panicked on edge-case errno via '.expect("2^BITS - res < 4096")'.
Called from every syscall wrapper (~40 call sites). A kernel returning
errno outside the 0..=4095 range would panic the entire process.

Fix: saturate to u16::MAX on overflow rather than panic. The errno
field is u16; values above u16::MAX indicate a kernel ABI violation,
and surfacing u16::MAX is safer than crashing every caller.

Trivial change (one line: .expect -> .unwrap_or(u16::MAX)) with a
comment explaining the saturate-vs-panic tradeoff.
2026-07-27 16:09:41 +09:00
2023-09-28 16:32:39 +02:00
2023-10-12 20:17:57 +02:00
S
Description
RedBear Operating System, based on RedoxOS. Licenced under MIT license.
https://redbearos.org
MIT 18 GiB
Languages
C 37.5%
C++ 37.2%
JavaScript 6.7%
QML 3.4%
HTML 3.2%
Other 11.4%