Eggdev: [Bug 455] New: Possible segment violation in join_notes

bugzilla-daemon at tsss.org bugzilla-daemon at tsss.org
Thu Dec 7 14:49:53 CST 2006


http://www.eggheads.org/bugzilla/show_bug.cgi?id=455

           Summary: Possible segment violation in join_notes
           Product: Eggdrop 1.6
           Version: 1.6.18
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Module: notes.mod
        AssignedTo: eggdev at eggheads.org
        ReportedBy: frelo184 at student.liu.se


After helping a user with an eggdrop crashing on invites, I've traced down his
issue to what I believe is a bug in join_notes, resulting in a segment violation
should the function be called when there is no channels defined (chanset still
being a nullpointer).

The segment would be this, where chan has previously been assigned the value of
chanset:

    ...
    while (!chan) {
      if (ismember(chan, nick))
        return;                 /* They already know they have notes */
      chan = chan->next;
    }
    ...

In my opinion, !chan should really be chan, as there is no point in calling
ismember should there be no channels defined (resulting in a segment violation
in ismember), and should there be any channels defined, the loop would be
skipped altogether.

Unfortunately, I have not been able to recreate the rare condition leading to a
crash myself, but I'll attach a coredumb backtrace provided by the user.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Eggdev mailing list