|
This slide covers the second major category of memory vulnerabilities: the Double-free error. While it looks similar to the previous example, the impact on the system is quite different.
In this example, we see a typical Double-free scenario. It starts by allocating a small buffer of 10 characters. After checking that the allocation succeeded, the program correctly calls free(str) to release that memory back to the system.
The problem arises later in the programs logic, where free(str) is called a second time on that same pointer. |