Skip to content

Commit

Permalink
Fixed a potential crash from accessing invalid memory after unbanning…
Browse files Browse the repository at this point in the history
… people when checking whether a host is akick stuck. Fixes /cs unban not reapplying stuck ban masks.
  • Loading branch information
Adam- committed Oct 6, 2010
1 parent cb975f4 commit 4c64c86
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/actions.c
Expand Up @@ -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]);
}
}

Expand Down
9 changes: 7 additions & 2 deletions src/botserv.c
Expand Up @@ -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]);
}
}

Expand Down
3 changes: 2 additions & 1 deletion version.log
Expand Up @@ -8,9 +8,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="5"
VERSION_EXTRA="-git"
VERSION_BUILD="3043"
VERSION_BUILD="3044"

# $Log$ # Changes since 1.8.5 Release
#Revision 3044 - 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.
#Revision 3043 - Fixed /nickserv saset display to change the nicktracking of the users affected by it, not the user executing it
#Revision 3042 - Fixed /nickserv group to use nicktracking if enabled
#Revision 3041 - Rewrote the mail forking code to use pipes, sometimes mails wouldn't work with the old method
Expand Down

0 comments on commit 4c64c86

Please sign in to comment.