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:
@@ -1184,9 +1184,8 @@ char s[BIG_BUFFER_SIZE+1];
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
BADARGS(3,3 ," hand idx text");
|
BADARGS(3,3 ," hand idx text");
|
||||||
|
|
||||||
strmcpy(s,argv[2],BIG_BUFFER_SIZE-2);
|
strlcpy(s, argv[2], sizeof s - 1);
|
||||||
strncat(s,"\n",BIG_BUFFER_SIZE-1);
|
strlcat(s, "\n", sizeof s);
|
||||||
s[BIG_BUFFER_SIZE]=0;
|
|
||||||
idx = atoi(argv[1]);
|
idx = atoi(argv[1]);
|
||||||
send(idx, s, strlen(s), 0);
|
send(idx, s, strlen(s), 0);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user