Tag: safety
3 posts
-
C++ Use-After-Free (UAF): Causes, ASan, and Ownership Rules
Why use-after-free bugs in C++ hide until much later, the patterns that cause them (invalidation, escaped raw pointers, callbacks), and how ASan pinpoints them.
-
C++ Dangling References: Lifetime and Temporaries
Dangling references in C++: returning references to locals, temporaries, container invalidation, lambdas, and fixes—values, smart pointers, ASan.
-
C++ Buffer Overflows: Causes, Safe APIs, and Security Impact
Buffer overflows in C and C++: strcpy, memcpy, stack and heap corruption, ASan, strncpy vs string, bounds checks, and secure coding patterns.