How to protect, prevent and mitigate buffer overflow attacks

How to protect, prevent and mitigate buffer overflow attacks