From 536aea47045b34319d884c9be5048b8c23bc85c0 Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Wed, 2 Oct 2013 00:02:54 +0000 Subject: [PATCH] Use strlcpy, rather than strmcpy, in function_prefix. From caf. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@378 13b04d17-f746-0410-82c6-800466cd88b0 --- source/functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/functions.c b/source/functions.c index 7ea3400..ffd0996 100644 --- a/source/functions.c +++ b/source/functions.c @@ -7186,8 +7186,8 @@ BUILT_IN_FUNCTION(function_prefix, input) */ if (my_strnicmp(words[0], words[word_index], len_index)) { - retval = new_malloc(len_index + 1); - strmcpy(retval, words[0], len_index - 1); + retval = new_malloc(len_index); + strlcpy(retval, words[0], len_index); new_free((char **)&words); return retval; }