kornel
13
You can't rely on the unsafe
keyword to check safety of crates. There are many other "safe" ways to inject arbitrary code and evade the checks:
This is because unsafe
is not a security boundary. It's a lint for double-checking programmer's own assumptions, and not a sandbox.
7 Likes