From 559dfdd278104c265527ac3aef412095dd962600 Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Sat, 19 Oct 2013 20:52:37 +0000 Subject: [PATCH] Use strlcat, rather than strmcat, in fill_it_out(). git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@399 13b04d17-f746-0410-82c6-800466cd88b0 --- source/hook.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/hook.c b/source/hook.c index e22b38d..832048b 100644 --- a/source/hook.c +++ b/source/hook.c @@ -258,7 +258,7 @@ extern int last_function_call_level; */ static char * fill_it_out (char *str, int params) { - char buffer[BIG_BUFFER_SIZE + 1]; + char buffer[BIG_BUFFER_SIZE]; char *arg, *ptr; int i = 0; @@ -269,19 +269,19 @@ static char * fill_it_out (char *str, int params) while ((arg = next_arg(ptr, &ptr)) != NULL) { if (*buffer) - strmcat(buffer, space, BIG_BUFFER_SIZE); - strmcat(buffer, arg, BIG_BUFFER_SIZE); + strlcat(buffer, space, sizeof buffer); + strlcat(buffer, arg, sizeof buffer); if (++i == params) break; } for (; i < params; i++) - strmcat(buffer, (i < params-1) ? " %" : " *", BIG_BUFFER_SIZE); + strlcat(buffer, (i < params-1) ? " %" : " *", sizeof buffer); if (*ptr) { - strmcat(buffer, space, BIG_BUFFER_SIZE); - strmcat(buffer, ptr, BIG_BUFFER_SIZE); + strlcat(buffer, space, sizeof buffer); + strlcat(buffer, ptr, sizeof buffer); } return m_strdup(buffer); }