I know this but became lazy until a hidden bug cost me the last two days chasing up and down my code. What I wanted to share here is if you have a c-string, make sure you check whether you are overflowing it by checking it every time you are about to add to it.
Say if you have this:
char buffer; int buffer_pointer=0;
Then you will fill up the buffer like:
in a loop. Make sure you do
if (buffer_pointer==64) Serial.println("Buffer full");
Even if you swear on your great grand father's grave that this buffer will NEVER EVER EVER fill. I will tell you a winded story if you swear instead of checking bounds.