fix strncat() use causing warnings about buffer overflow