Make sure that buffer is null terminated
Merge pull request #319 from LebedevRI/copy-into-fixed-size-buffer

Fix Copy into fixed size buffer