1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-14 22:15:54 +02:00

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

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.