strncat was using strncpy internally which nullpadded dest until n bytes were written. also there was no terminating null byte added if src was shorter than n bytes