(svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated.

This commit is contained in:
rubidium
2008-09-29 16:27:02 +00:00
parent d34da3cadb
commit 5ab74534da
10 changed files with 14 additions and 11 deletions

View File

@@ -389,7 +389,7 @@ IConsoleAlias *IConsoleAliasGet(const char *name)
static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos)
{
int len = min(ICON_MAX_STREAMSIZE - bufpos, (uint)strlen(src));
strncpy(dst, src, len);
strecpy(dst, src, dst + len - 1);
return len;
}