diff options
author | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-09-10 11:47:40 +0000 |
---|---|---|
committer | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-09-10 11:47:40 +0000 |
commit | 9737fafd75ad7288827aec5bf124f6312d2f3a97 (patch) | |
tree | eccc10e5a93fe717987f4accfc1aea63a8da0162 /src | |
parent | ec3d8bda5eb0603e02027a7f5273422d6b243280 (diff) |
BUILD : 1.7.5 (344) BUGS : NOTES : Fixed bug with an uninitialized buffer in check_sqline()
git-svn-id: svn://svn.anope.org/anope/trunk@344 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@220 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/operserv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/operserv.c b/src/operserv.c index 1836f943e..adc0ce115 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -2882,7 +2882,7 @@ int check_sqline(char *nick, int nick_change) { int i; SXLine *sx; - char *reason; + char *reason = NULL; if (sqlines.count == 0) return 0; @@ -2900,9 +2900,10 @@ int check_sqline(char *nick, int nick_change) if (match_wild_nocase(sx->mask, nick)) { sqline(sx->mask, sx->reason); /* We kill nick since s_sqline can't */ + reason = smalloc(strlen(sx->reason) + 10); snprintf(reason, sizeof(reason), "Q-Lined: %s", sx->reason); kill_user(s_OperServ, nick, reason); - + free(reason); return 1; } } |