Module cve_rs::buffer_overflow
source · Expand description
A memory-safe buffer overflow.
We allocate a slice on the stack, then transmute it into a String with a large capacity. Then, we read input from stdin into that String. This overwrites another stack-allocated slice, and then we can check if it’s successfully overwritten.
Functions§
- Perform a buffer overflow.