It depends. If the array is *allocated* then such a type of error should be detected. However, it also depends on allocation alignment. Some code requires code to be aligned in a certain way. Because of that it's sometimes possible that I can't detect if you just overrun a buffer by a tiny amount (say just 1 byte or maybe 2-3 bytes), but it also depends on the exact size of the buffer.
Your code seems to use a local variable. Such variables are not allocated, they're instead placed on the stack by the compiler, which makes it technically impossible for me to detect an overrun.