Most languages used to write web-code - like Python, Ruby, Node, Java and .NET - used "managed memory", and are immune to buffer overflow attacks.
Memory-Safe Java Code
try { String[] array = { "a", "b", "c" }; array[25] = "z"; } catch (ArrayIndexOutOfBoundsException e) { // Attempts to overflow the buffer will raise an error in Java. e.printStackTrace(); }