From 9207c838f9042f8dc3471f71008a6df3128f08fc Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Sun, 18 Aug 2013 09:56:12 +0000 Subject: [PATCH] Use strlcpy and strlcat, rather than strmcpy and strncat, in tcl_putdcc(). git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@360 13b04d17-f746-0410-82c6-800466cd88b0 --- source/tcl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/tcl.c b/source/tcl.c index f062a5b..96897fb 100644 --- a/source/tcl.c +++ b/source/tcl.c @@ -1184,9 +1184,8 @@ char s[BIG_BUFFER_SIZE+1]; int idx = 0; BADARGS(3,3 ," hand idx text"); - strmcpy(s,argv[2],BIG_BUFFER_SIZE-2); - strncat(s,"\n",BIG_BUFFER_SIZE-1); - s[BIG_BUFFER_SIZE]=0; + strlcpy(s, argv[2], sizeof s - 1); + strlcat(s, "\n", sizeof s); idx = atoi(argv[1]); send(idx, s, strlen(s), 0); return TCL_OK;