News for hackers. Stuff that matters.
Re:The Most Memory Safe Buffer Overflow in Rust by jepler on Friday February 18, 2022 @09:07AM (#30385792)
Some commentary would have helped me. I don't read (or write) rust but my understanding:

    * an untyped, unchecked region of memory is modeled by `let mut mem = Vec::<char>::new();`
    * First, a fixed range of 16 bytes in mem is allocated for the password to be read
    * Then the password to check against is allocated and stored in mem
    * Then the input with embedded `'\0'`s is read into the range, without respecting the BUF_CAP
    * Finally, the two regions within `mem` are compared for string equality
There were no unsafe operations, but an "undesired" result can occur.

There are no comments on this comment yet.