Use strlcpy, rather than strmcpy, in function_fexist().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@345 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -4065,19 +4065,19 @@ BUILT_IN_FUNCTION(function_fexist, words)
|
||||
if ((filename = new_next_arg(words, &words)))
|
||||
{
|
||||
if (*filename == '/')
|
||||
strlcpy(FileBuf, filename, BIG_BUFFER_SIZE);
|
||||
strlcpy(FileBuf, filename, sizeof FileBuf);
|
||||
|
||||
else if (*filename == '~')
|
||||
{
|
||||
if (!(fullname = expand_twiddle(filename)))
|
||||
RETURN_INT(-1);
|
||||
|
||||
strmcpy(FileBuf, fullname, BIG_BUFFER_SIZE);
|
||||
strlcpy(FileBuf, fullname, sizeof FileBuf);
|
||||
new_free(&fullname);
|
||||
}
|
||||
#if defined(__EMX__) || defined(WINNT)
|
||||
else if (is_dos(filename))
|
||||
strmcpy(FileBuf, filename, BIG_BUFFER_SIZE);
|
||||
strlcpy(FileBuf, filename, sizeof FileBuf);
|
||||
#endif
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user