What Is The Best Method To Avoid Buffer Overflows?

What Is The Best Method To Avoid Buffer Overflows? Address space randomization (ASLR)—randomly moves around the address space locations of data regions. … Data execution prevention—flags certain areas of memory as non-executable or executable, which stops an attack from running code in a non-executable region. What are the two ways to prevent buffer overflow attacks?