Fix!

Fix buffer not null terminated error when strncpy is used.

Found by coverity scan.