Changeset e1bea35


Ignore:
Timestamp:
2015-10-08T09:38:15Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
c4e61db
Parents:
c788e15
Message:

Fix use-after-free when leaving invited (temporary) channels

Trac ticket 1229, https://bugs.bitlbee.org/bitlbee/ticket/1229

This one is complicated. See the trac ticket for details.

Relevant commits: cc20520 6963230 664bac3 - second one fixed the same
issue, third one reverted it, this one takes a different approach.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    rc788e15 re1bea35  
    863863        }
    864864
    865         /* Remove the reference. We don't need it anymore. */
    866         ic->data = NULL;
     865        if (!(ic->flags & IRC_CHANNEL_TEMP)) {
     866                /* Remove the reference.
     867                 * We only need it for temp channels that are being freed */
     868                ic->data = NULL;
     869        }
    867870
    868871        return TRUE;
Note: See TracChangeset for help on using the changeset viewer.