diff options
| author | Adam <Adam@anope.org> | 2010-10-06 16:20:50 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-10-06 16:20:50 -0400 |
| commit | 4c64c86ef4ddf9ff09c8f51f8a38e20f0513ae8d (patch) | |
| tree | 747ade72b13bd960e4b404afe231c96e121677e9 /src/botserv.c | |
| parent | cb975f4a6c9199179ee8b0e6aec2c0951856709d (diff) | |
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.
Diffstat (limited to 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/botserv.c b/src/botserv.c index 0b2ad746c..605a0292e 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -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]); } } |
