Use a feature like Address Space Layout Randomization (ASLR) [R.120.5] [R.120.7].
Use a CPU and operating system that offers Data Execution Protection (NX) or its
equivalent [R.120.7] [R.120.9].
CWE-120 : Buffer Copy