1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-02 21:16:54 +02:00

Memory Management: Leaks are bad, RCE is worse ()

Leaks are bad, RCE is worse
This commit is contained in:
Dominik Maier
2023-07-18 07:36:14 +02:00
committed by GitHub
parent aabe0c0a96
commit 3f1a8d8ca1

@ -20,3 +20,4 @@ void foo(size_t n) {
Memory is leaked if the function returns early between `malloc` and `free`: the
pointer is lost and we cannot deallocate the memory.
Worse, freeing the pointer twice, or accessing a freed pointer can lead to exploitable security vulnerabilities.