This and the following strncpy should copy one byte less to ensure that the strings are terminated.