4 ms·
But it can overflow, which will result in a different value that the programmer might expect, which can give an attacker a nice "information leak" or worse. Thi
by ben_bai 10y ago
But it can overflow, which will result in a different value that the programmer might expect, which can give an attacker a nice "information leak" or worse. This could be a security bug!
- gajjanag 10y agoExactly. Memory safety is a very nice property, but is not complete by itself. This primary emphasis on memory safety was part of a critique of Rust by Andrei Alexandrescu: https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why https://www.quora.com/Which-language-has-the-brightest-futur.... And even wrt memory, Rust (with the standard library) is not free of its own warts, see the OOM situation. See e.g https://news.ycombinator.com/item?id=10545877 https://news.ycombinator.com/item?id=10545877 for a discussion on this. Just to be clear: I generally like the ideas of Rust. I just dislike its presentation by some as a magic solution to all kinds of concerns.