pub fn buffer_overflow()
Expand description

We create a ’static reference to a dropped, 10-byte buffer, then create a 5-byte buffer in its place. By writing to the buffer from our old reference, Rust thinks the buffer is still 10 bytes, and writes 10 bytes to our 5-byte buffer.