A remote code execution vulnerability in GNOME
A remote code execution vulnerability in GNOME
Posted Oct 12, 2023 9:04 UTC (Thu) by Tobu (subscriber, #24111)In reply to: A remote code execution vulnerability in GNOME by dvrabel
Parent article: A remote code execution vulnerability in GNOME
I don't believe someone would write this innocently when the alternative is a simple v[s.parse::<usize>()?].
I looked at the cue-parsing crates I could find: cuna, rbchunk, rcue, cue_sheet, none of them use unsafe, rcue forbids unsafe_code. cuna does depend on parser library nom, which has uses of unsafe in six string splitting functions and has unsafe dependencies for memchr and float parsing.
I do wish clippy had a blanket lint against all uses of `as` for numeric casts, which are a code smell when from/try_from exist. Right now you have to go through this list, many of which are allowed by default, and there are holes.
