I have created a buggy program - buggy.c - this is a buffer-overflow scenario for buffer t. You can see that I am writing more than 5 indexes. It works fine. It never throws me
Valgrind and EF detect errors in dynamically-allocated memory. Your array is not dynamically-allocated.