A remote code execution vulnerability in GNOME
A remote code execution vulnerability in GNOME
Posted Oct 10, 2023 22:26 UTC (Tue) by walters (subscriber, #7396)In reply to: A remote code execution vulnerability in GNOME by dvrabel
Parent article: A remote code execution vulnerability in GNOME
In Rust it's much more idiomatic to use iterators (as well as the checked `get()`) than direct array indexing because in many case it's actually *more* ergonomic, and doing so helps the compiler elide bounds checks actually.
For example https://doc.rust-lang.org/std/primitive.slice.html#method... is just way better than doing the equivalent indexing by hand.
So usage of `get_unchecked` is IME very unusual in Rust and would be a large code smell outside of very low level code.
