Use memcpy() rather than StrNCpy() which had forced a string termination character at the end.
Attach a file by drag & drop or click to upload