From 9737fafd75ad7288827aec5bf124f6312d2f3a97 Mon Sep 17 00:00:00 2001 From: "certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Fri, 10 Sep 2004 11:47:40 +0000 Subject: 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 --- src/operserv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; } } -- cgit