I don’t think that casting a range of bits as some other arbitrary type “is a bug nobody sees coming”.

C++ compilers also warn you that this is likely an issue and will fail to compile if configured to do so. But it will let you do it if you really want to.

That’s why I love C++

  • @[email protected]
    link
    fedilink
    124 days ago

    You don’t even need unsafe, you can just take user input and execute it in a shell and rust will let you do it. Totally insecure!

    • Ignotum
      link
      fedilink
      144 days ago

      Rust isn’t memory safe because you can invoke another program that isn’t memory safe?

      • @[email protected]
        link
        fedilink
        83 days ago

        My comment is sarcastic, obviously. The argument Kairos gave is similar to this. You can still introduce vulnerabilities. The issue is normally that you introduce them accidentally. Rust gives you safety, but does not put your code into a sandbox. It looked to me like they weren’t aware of this difference.