I have found in the past that whenever I see something like this in my program, I have not defined the array correctly - one less element than I need, or bytes instead of words. Just because it's not defined correctly, does not mean you can't write to it as if it was, and then overwrite something. Where you put the definition in the program defines whether or not you end up overwriting useful code, or unused space. That's why it is helpful to post the code, rather than a generic question. Somebody will spot this condition and point it out, rather than guessing about device bugs. Maybe you have found a bug... maybe not.