Avoid buffer overflow with strncpy.
Merge pull request #24 from jan-schreib/avoid-buffer-overflow

Avoid buffer overflow with strncpy.