That's why you need Rust in any image decoder. FFMPEG too.
Rust is not a magic security wand.
Apple has been propagating Swift for more than a decade now and at least in theory, it should be on par with Rust in terms of safety I'd say.
Rust is not a magic security wand.