Partially revert r456.
An snprintf() call that creates IRC protocol messages must use (MAX_PROTOCOL_SIZE + 1) as 'n' rather than the buffer size. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@461 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -147,8 +147,8 @@ void BX_close_server (int cs_index, char *message)
|
||||
if (x_debug & DEBUG_OUTBOUND)
|
||||
yell("Closing server %d because [%s]",
|
||||
cs_index, message ? message : empty_string);
|
||||
snprintf(buffer, sizeof buffer, "QUIT :%s", message);
|
||||
strlcat(buffer, "\r\n", IRCD_BUFFER_SIZE + 1);
|
||||
snprintf(buffer, MAX_PROTOCOL_SIZE + 1, "QUIT :%s", message);
|
||||
strlcat(buffer, "\r\n", sizeof buffer);
|
||||
#ifdef HAVE_SSL
|
||||
if (get_server_ssl(cs_index))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user