From 1ed25f94a6447fb02db1241b4d39ec5fddd9b97b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 17 May 2006 11:46:24 +0000 Subject: [PATCH] - Fixed implicit declaration compiler warning if compiling for ipv6. - Fixed some small memory leak on rehash. - Removed spamfilter-oversized-checking when trying to REMOVE one.. duh.. reported by satmd (#00029160). --- Changes | 4 ++++ src/api-command.c | 1 + src/modules/m_tkl.c | 5 ++++- src/s_auth.c | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index c0bc94d4f..5fd48bf4d 100644 --- a/Changes +++ b/Changes @@ -1168,3 +1168,7 @@ - (multiple?) IPv6 listen blocks could cause a crash in config parser. Reported by Robby22 (#0002868). - Added error checking to (main) setuid/setgid calls. +- Fixed implicit declaration compiler warning if compiling for ipv6. +- Fixed some small memory leak on rehash. +- Removed spamfilter-oversized-checking when trying to REMOVE one.. duh.. reported by satmd + (#00029160). diff --git a/src/api-command.c b/src/api-command.c index acc1c7f76..6bd8dcc3f 100644 --- a/src/api-command.c +++ b/src/api-command.c @@ -116,6 +116,7 @@ void CommandDel(Command *command) { if (!*tmp) { IsupportDel(IsupportFind("CMDS")); + free(tmp); cmdstr = NULL; } else diff --git a/src/modules/m_tkl.c b/src/modules/m_tkl.c index 430c922ac..8d2819bb7 100644 --- a/src/modules/m_tkl.c +++ b/src/modules/m_tkl.c @@ -35,8 +35,11 @@ #include #ifdef _WIN32 #include +#else +#include #endif #include +#include "inet.h" #include "h.h" #include "proto.h" #ifdef STRIPBADWORDS @@ -806,7 +809,7 @@ int n; * on 50 characters for the rest... -- Syzop */ n = strlen(reason) + strlen(parv[6]) + strlen(tkllayer[5]) + (NICKLEN * 2) + 40; - if (n > 500) + if ((n > 500) && (whattodo == 0)) { sendnotice(sptr, "Sorry, spamfilter too long. You'll either have to trim down the " "reason or the regex (exceeded by %d bytes)", n - 500); diff --git a/src/s_auth.c b/src/s_auth.c index db1f1a6e3..a27c67051 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -103,6 +103,7 @@ void start_auth(aClient *cptr) set_non_blocking(cptr->authfd, cptr); /* Bind to the IP the user got in */ + memset(&sock, 0, sizeof(sock)); len = sizeof(us); if (!getsockname(cptr->fd, (struct SOCKADDR *)&us, &len)) {