diff options
| author | Alexander Barton <alex@barton.de> | 2013-05-30 08:55:48 -0700 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2013-05-30 08:55:48 -0700 |
| commit | 9d3800fd15a273f23f51c1f1ab3bc75dacf6c589 (patch) | |
| tree | 43087347bf9374c11f82199c112c4d2cfb867cee /src | |
| parent | 7ea3864a9369086024a2d541b053963958b19899 (diff) | |
| parent | 4f525d39d4ca885da69800c396045459af8bb0eb (diff) | |
| download | ngircd-9d3800fd15a273f23f51c1f1ab3bc75dacf6c589.tar.gz ngircd-9d3800fd15a273f23f51c1f1ab3bc75dacf6c589.zip | |
Merge pull request #3 from Cofyc/master
irc-info.c: some commands use LINE_LEN as command buffer len
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-info.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 24d65651..668f5ed6 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -298,7 +298,7 @@ IRC_WHO_Mask(CLIENT *Client, char *Mask, bool OnlyOps) static bool IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) { - char str[LINE_LEN + 1]; + char str[COMMAND_LEN]; CL2CHAN *cl2chan; CHANNEL *chan; @@ -347,7 +347,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) str, sizeof(str)); strlcat(str, Channel_Name(chan), sizeof(str)); - if (strlen(str) > (LINE_LEN - CHANNEL_NAME_LEN - 4)) { + if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) { /* Line becomes too long: send it! */ if (!IRC_WriteStrClient(Client, "%s", str)) return DISCONNECTED; @@ -838,7 +838,7 @@ IRC_NAMES( CLIENT *Client, REQUEST *Req ) strlcat(rpl, " ", sizeof(rpl)); strlcat(rpl, Client_ID(c), sizeof(rpl)); - if (strlen(rpl) > LINE_LEN - CLIENT_NICK_LEN - 4) { + if (strlen(rpl) > COMMAND_LEN - CLIENT_NICK_LEN - 4) { /* Line is gwoing too long, send now */ if (!IRC_WriteStrClient(from, "%s", rpl)) return DISCONNECTED; @@ -1501,7 +1501,7 @@ GLOBAL bool IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan) { bool is_visible, is_member; - char str[LINE_LEN + 1]; + char str[COMMAND_LEN]; CL2CHAN *cl2chan; CLIENT *cl; @@ -1540,7 +1540,7 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan) str, sizeof(str)); strlcat(str, Client_ID(cl), sizeof(str)); - if (strlen(str) > (LINE_LEN - CLIENT_NICK_LEN - 4)) { + if (strlen(str) > (COMMAND_LEN - CLIENT_NICK_LEN - 4)) { if (!IRC_WriteStrClient(Client, "%s", str)) return DISCONNECTED; snprintf(str, sizeof(str), RPL_NAMREPLY_MSG, |