strncpy/strncat must be used instead. But in this case they don't make sense, because string has enough space.