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
This commit is contained in:
Tim Cava
2013-08-18 09:56:12 +00:00
parent 2fea73808f
commit 9207c838f9

View File

@@ -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;