1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 19:53:13 +02:00

Fixed a potential crash from accessing invalid memory after unbanning people when checking whether a host is akick stuck. Fixes /cs unban not reapplying stuck ban masks.

This commit is contained in:
Adam
2010-10-06 16:20:50 -04:00
parent cb975f4a6c
commit 4c64c86ef4
3 changed files with 16 additions and 5 deletions
+7 -2
View File
@@ -184,11 +184,16 @@ void common_unban(ChannelInfo * ci, char *nick)
entry_match(ban, u->nick, u->username, u->chost, ip)) {
anope_cmd_mode(whosends(ci), ci->name, "-b %s", ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
av[3] = sstrdup(ban->mask);
else
av[2] = ban->mask;
av[2] = sstrdup(ban->mask);
do_cmode(whosends(ci), ac, av);
if (ircdcap->tsmode)
free(av[3]);
else
free(av[2]);
}
}
+7 -2
View File
@@ -789,11 +789,16 @@ void bot_join(ChannelInfo * ci)
anope_cmd_mode(whosends(ci), ci->name, "-b %s",
ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
av[3] = sstrdup(ban->mask);
else
av[2] = ban->mask;
av[2] = sstrdup(ban->mask);
do_cmode(whosends(ci), ac, av);
if (ircdcap->tsmode)
free(av[3]);
else
free(av[2]);
}
}