Serial.read() and for loop problems

You're printing a not-null-terminated C-string, which results in printing any of the following bytes in memory until it reaches a null bytes by chance. Extend your string size by one byte and insert a null byte there, it will probably work.