summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-20 22:50:56 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-20 22:50:56 +0000
commite37f5a3c5dab9f625e9105bfc893104e4ed8c3e2 (patch)
tree60e80106d3a8fb373092363c33494fc147bbb33f
parent389b42b9c3bb23fd54ba52d109c1ab79d85b8cad (diff)
- m_encap.c:ms_encap(): removed pointless code. Buffer can't be overflown
since snprintf() is being used git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2886 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--modules/m_encap.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/modules/m_encap.c b/modules/m_encap.c
index 5390f62..b36eecb 100644
--- a/modules/m_encap.c
+++ b/modules/m_encap.c
@@ -64,8 +64,6 @@ ms_encap(struct Client *client_p, struct Client *source_p,
ptr += len;
}
- len = strlen(parv[i]);
-
/*
* If the final parameter crosses our buffer size, should we bail,
* like the rest, or should we truncate? ratbox seems to think truncate,
@@ -76,9 +74,6 @@ ms_encap(struct Client *client_p, struct Client *source_p,
else
snprintf(ptr, sizeof(buffer) - cur_len, ":%s", parv[parc - 1]);
- if ((cur_len + len) >= sizeof(buffer))
- buffer[sizeof(buffer) - 1] = '\0';
-
sendto_match_servs(source_p, parv[1], CAP_ENCAP,
"ENCAP %s", buffer);