3 ms·
I think that oversimplifies the ways that Rust (and Java and Go) are safer than C and C++. Of course in any language, the code that handles a buffer can acciden
by oconnor663 10y ago
I think that oversimplifies the ways that Rust (and Java and Go) are safer than C and C++. Of course in any language, the code that handles a buffer can accidentally send that buffer to someone it shouldn't. The problem with unsafe code, though, is that mistakes anywhere in your program can leak the contents of any buffer. Languages that make unsafe code rare are much less exposed to that sort of chaos.
This was the case here. An unsafe parser leaked memory that had nothing to do with what it was parsing.
Related: https://tonyarcieri.com/would-rust-have-prevented-heartbleed-another-look https://tonyarcieri.com/would-rust-have-prevented-heartbleed...