Does strncpy()
not have proper equivalent in arm which will take both destination size and number of source characters to be copied,
strlcpy(char * /*dst*/, const char * /*src*/, size_t /*len*/);
so here we have to just use strlcpy()
and hope source string is null terminated?
MS has provided one which is perfect (at least appears to be ;)):
StringCchCopyN(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc, size_t cchSrc);
To the uninitiated, strncpy()
is not secure (why strncpy is unsafe]1).
You need to write your own ones
OR