diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/channels.c | 11 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 14 insertions, 4 deletions
@@ -1,6 +1,7 @@ Anope Version S V N ------------------- Provided by Anope Dev. <dev@anope.org> - 2005 +05/13 F Possible segfault with do_part by using freed memory. [#379] 05/13 F Long hosts got cut off when setting topic and host was recorded. [#377] 05/12 F NSListOpersOnly works correctly. [#375] 05/12 F Using variable for EVENT_PART_CHANNEL after freeing it. [#374] diff --git a/src/channels.c b/src/channels.c index 342c55a11..7f4867c40 100644 --- a/src/channels.c +++ b/src/channels.c @@ -653,6 +653,7 @@ void do_part(const char *source, int ac, char **av) User *user; char *s, *t; struct u_chanlist *c; + char *channame; user = finduser(source); if (!user) { @@ -676,8 +677,10 @@ void do_part(const char *source, int ac, char **av) alog("user: BUG parting %s: channel entry found but c->chan NULL", s); return; } + channame = sstrdup(c->chan->name); send_event(EVENT_PART_CHANNEL, 3, EVENT_START, user->nick, - c->chan->name); + channame); + chan_deluser(user, c->chan); if (c->next) c->next->prev = c->prev; @@ -685,9 +688,11 @@ void do_part(const char *source, int ac, char **av) c->prev->next = c->next; else user->chans = c->next; - send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick, - c->chan->name); free(c); + + send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick, + channame); + free(channame); } } } diff --git a/version.log b/version.log index fccca5ebd..1326a778b 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="9" -VERSION_BUILD="794" +VERSION_BUILD="795" # $Log$ # +# BUILD : 1.7.9 (795) +# BUGS : 379 +# NOTES : Fixed the channelname issue in do_part once and for all with sstrdup(tm) power +# # BUILD : 1.7.9 (794) # BUGS : 377 # NOTES : Removed any ! and further from topicsetters, since Unreal sometimes sends a nick!user@host topicsetter instead of just nick |