• Bug#164753: Bubblemon crash on network interface down [patch]

    From Thomas Morin@1:229/2 to All on Thu Aug 12 23:00:18 2004
    From: [email protected]

    This is a multi-part message in MIME format.
    |retitle| 164753 removing a network card segfaults bubblemon
    tags 164753 + patch
    thanks

    Hi,

    I've been running into this bug many times in the last days : each time
    I unplug my laptop network connector, bubblemon is segfaulting.

    Today I looked more closely :
    - same backtrace as the one mentioned in this bug report, ending in the netload_reportBack function
    - I noticed a strange thing in the netload_forcedFindInterface function
    (called by netload_reportBack), in the portion which is run when no
    interface is found (netload.c, line 72):

    (interface is a chain struct)

    interface->next = interfaces;
    interfaces = interface;

    This obviously a loop : the chained structure loops onto itself (interfaces->next == interfaces).

    I patched :
    - interface->next = interfaces;
    + interface->next = NULL;

    Then I recompiled the package, installed it, and now the crash doesn't
    happen anymore.
    Yay!

    Now I don't know why it is segfaulting in netload_reportBack (this is
    weird because the struct is not read in this function).
    But well, this loop is definitely a bug, and fixing it seems to avoid
    the segfault (YMMV).

    Could you please apply this patch please ?
    (upstream CC'd)

    I hope this helps,

    -Thomas



    --- netload.c.orig 2004-08-12 19:55:29 +0200
    +++ netload.c 2004-08-12 19:40:39 +0200
    @@ -72,7 +72,7 @@

    interface->isAlive = 0;

    - interface->next = interfaces;
    + interface->next = NULL;
    interfaces = interface;
    }

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)